home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / reportplus / source / f1.c < prev    next >
C/C++ Source or Header  |  2002-10-27  |  106KB  |  2,548 lines

  1. #include <exec/types.h>
  2. #include <exec/memory.h>
  3. #include <proto/exec.h>
  4. #include <intuition/intuition.h>
  5. #include <intuition/gadgetclass.h>
  6. #include <proto/intuition.h>
  7. #include <libraries/gadtools.h>
  8. #include <proto/gadtools.h>
  9. #include <dos/dos.h>
  10. #include <proto/dos.h>
  11. #include <graphics/gfx.h>
  12. #include <clib/graphics_protos.h>
  13.  
  14. #include <clib/alib_protos.h>
  15. #include <ctype.h>
  16. #include <stdlib.h>
  17. #include <string.h>
  18. #include "rp.h"
  19.  
  20. #define ALL_REACTION_CLASSES
  21. #include <reaction/reaction.h>
  22. #include <clib/texteditor_protos.h>
  23. #include <gadgets/texteditor.h>
  24. #include <pragmas/texteditor_pragmas.h>
  25. #include <gadgets/chooser.h>
  26. #include <pragmas/chooser_pragmas.h>
  27.  
  28. #define SUBSYSTEMS   128 // counting from 0
  29. #define CPUS           4 // counting from 0
  30. #define MODELS        13 // counting from 0
  31. #define AGNUSES        4 // counting from 0
  32. #define MAXELEMENTS    4 // counting from 0
  33.  
  34. MODULE void refreshpv(void);
  35. MODULE void updatereportgadgets(void);
  36. MODULE void readreportgadgets(void);
  37. MODULE ULONG Hook1Func(struct Hook *h, VOID *o, VOID *msg);
  38. MODULE void updateemail(void);
  39.  
  40. AGLOBAL struct ReportStruct report;
  41.  
  42. MODULE struct Gadget*  report_gadgets[GIDS_1 + 1];
  43. MODULE ABOOL           SubsystemNodes = FALSE;
  44. MODULE struct List     SubsystemList;
  45.  
  46. MODULE struct
  47. {   STRPTR friendly;
  48.     STRPTR unfriendly;
  49. } subsystems[SUBSYSTEMS + 1] =
  50. {   {"3D Look",                "new.look"        },
  51.     {"A590",                   "A2091.A590"      },
  52.     {"A2013",                  "A2013"           },
  53.     {"A2065",                  "A2065"           },
  54.     {"A2090",                  "A2090.A2090A"    },
  55.     {"A2090A",                 "A2090.A2090A"    },
  56.     {"A2091",                  "A2091"           },
  57.     {"A2232",                  "A2232"           },
  58.     {"A2300",                  "A2300"           },
  59.     {"A2410",                  "A2410"           },
  60.     {"A2620",                  "A2620"           },
  61.     {"A2630",                  "A2630"           },
  62.     {"A3000",                  "A3000"           },
  63.     {"A4091",                  "A4091"           },
  64.     {"AmigaBASIC",             "AmigaBasic"      },
  65.     {"AGA chipset",            "aa.chips"        },
  66.     {"ALink",                  "alink"           },
  67.     {"amiga.lib",              "amiga.lib"       },
  68.     {"AmigaGuide",             "amigaguide"      },
  69.     {"AmigaTerm",              "amigaterm"       },
  70.     {"AmigaVision",            "amigavision"     },
  71.     {"AppShell",               "appshell"        },
  72.     {"ARexx",                  "arexx"           },
  73.     {"Art",                    "art"             },
  74.     {"AS225",                  "as225"           },
  75.     {"ASL.library",            "asl.library"     },
  76.     {"audio.device",           "audio.device"    },
  77.     {"AUTOCONFIG",             "autoconfig"      },
  78.     {"Battery-backed clock",   "battclock"       },
  79.     {"Battery-backed memory",  "battmem"         },
  80.     {"Bootstrap",              "strap"           },
  81.     {"BridgeBoard",            "bridgeboard"     },
  82.     {"BRU",                    "bru"             },
  83.     {"bullet.library",         "bullet"          },
  84.     {"C: programs",            "cdos.command"    },
  85.     {"CD.device",              "cd.device"       },
  86.     {"CD32 hardware",          "cdgs"            },
  87.     {"CDFileSystem",           "cdfilesystem"    },
  88.     {"CDTV",                   "cdtv"            },
  89.     {"CDTV.device",            "cdtv.device"     },
  90.     {"cdui",                   "cdui"            },
  91.     {"CIA.resource",           "cia.resource"    },
  92.     {"CLI",                    "shell"           },
  93.     {"clipboard.device",       "clipboard"       },
  94.     {"Commodities",            "commodities"     },
  95.     {"CON-Handler",            "con-handler"     },
  96.     {"console.device",         "console.device"  },
  97.     {"Custom chipset",         "custom.chips"    },
  98.     {"Datatypes",              "datatypes"       },
  99.     {"debug.lib",              "debug.lib"       },
  100.     {"Developer support",      "devsupport"      },
  101.     {"disk.resource",          "disk.resource"   },
  102.     {"diskfont.library",       "diskfont"        },
  103.     {"DOS.library",            "dos.library"     },
  104.     {"Early Startup Control",  "bootmenu"        },
  105.     {"Envoy",                  "envoy"           },
  106.     {"Exec.library",           "exec"            },
  107.     {"expansion.library",      "expansion"       },
  108.     {"filesystem",             "filesystem"      },
  109.     {"filesystem.resource",    "filesysres"      },
  110.     {"Fonts",                  "fonts"           },
  111.     {"Fountain",               "fountain"        },
  112.     {"gadget.classes",         "gadget.classes"  },
  113.     {"GadTools.library",       "gadtools"        },
  114.     {"gameport.device",        "gameport"        },
  115.     {"Genlock",                "genlock"         },
  116.     {"Graphics",               "graphics"        },
  117.     {"Hardware",               "hardware"        },
  118.     {"HDBackup",               "hdbackup"        },
  119.     {"HDToolBox",              "hdtoolbox"       },
  120.     {"icon.library",           "icon.library"    },
  121.     {"IconEdit",               "iconedit"        },
  122.     {"IDE.device",             "ide.device"      },
  123.     {"IFFParse.library",       "iffparse"        },
  124.     {"input.device",           "input.device"    },
  125.     {"Installer",              "installer"       },
  126.     {"IntelliFont",            "fountain"        },
  127.     {"Intuition.library",      "intuition"       },
  128.     {"IPrefs",                 "iprefs"          },
  129.     {"Keyboard",               "keyboard"        },
  130.     {"keymap.library",         "keymap"          },
  131.     {"Keymaps",                "keymaps"         },
  132.     {"layers.library",         "layers"          },
  133.     {"locale.library",         "locale.library"  },
  134.     {"lowlevel.library",       "lowlevel"        },
  135.     {"Maths: FFP",             "mathffp"         },
  136.     {"Maths: IEEE Double Precision", "mathieeedoub"    },
  137.     {"Maths: IEEE Single Precision", "mathieeesing"    },
  138.     {"Maths: IEEE",            "mathieee"        },
  139.     {"MicroEMACS",             "microemacs"      },
  140.     {"Monitors",               "monitors"        },
  141.     {"MultiView",              "multiview"       },
  142.     {"nonvolatile",            "nonvolatile"     },
  143.     {"parallel.device",        "parallel.device" },
  144.     {"PCMCIA",                 "creditcard"      },
  145.     {"PORT-Handler",           "port-handler"    },
  146.     {"potgo.resource",         "potgo.resource"  },
  147.     {"Preferences",            "preferences"     },
  148.     {"Printer drivers",        "printer.driver"  },
  149.     {"printer.device",         "printer.device"  },
  150.     {"QUEUE-Handler",          "queue-handler"   },
  151.     {"RAM-Handler",            "ram-handler"     },
  152.     {"ramlib",                 "ramlib"          },
  153.     {"realtime",               "realtime"        },
  154.     {"Report+",                "report+"         },
  155.     {"Resources",              "resource"        },
  156.     {"ROM Kernel Manuals",     "rkm"             },
  157.     {"ROMWack",                "wack"            },
  158.     {"Saga: Age of Heroes",    "saga"            },
  159.     {"SANA-2",                 "sana2"           },
  160.     {"Scripts",                "script"          },
  161.     {"SCSI.device",            "scsi.device"     },
  162.     {"serial.device",          "serial.device"   },
  163.     {"Shell",                  "shell"           },
  164.     {"Startup",                "startup"         },
  165.     {"System/ programs",       "system.command"  },
  166.     {"TCP/IP",                 "as225"           },
  167.     {"timer.device",           "timer.device"    },
  168.     {"ToolMaker",              "toolmaker"       },
  169.     {"Tools/ programs",        "tools"           },
  170.     {"trackdisk.device",       "trackdisk"       },
  171.     {"UNIX",                   "unix"            },
  172.     {"Unsure",                 ""                },
  173.     {"User manuals",           "userdocs"        },
  174.     {"Utilities/ programs",    "util.command"    },
  175.     {"utility.library",        "utility.library" },
  176.     {"Wack",                   "wack"            },
  177.     {"Workbench",              "workbench"       },
  178.     {"Worm Wars",              "wormwars"        }
  179. };
  180. MODULE STRPTR TypeOptions[4] =
  181. {   "System Software/Hardware Bug",
  182.     "3rd Party Product Compatibility",
  183.     "Enhancement Request",
  184.     NULL
  185. };
  186. MODULE STRPTR SeverityOptions[5] =
  187. {   (STRPTR) "Crashes, hangs or corrupts data",
  188.     (STRPTR) "Behaves incorrectly",
  189.     (STRPTR) "Cosmetic problem",
  190.     (STRPTR) "Works correctly",
  191.     NULL
  192. };
  193. MODULE STRPTR AgnusOptions[AGNUSES + 2] =
  194. {   (STRPTR) "AGA",
  195.     (STRPTR) "ECS PAL",
  196.     (STRPTR) "ECS NTSC",
  197.     (STRPTR) "OCS PAL",
  198.     (STRPTR) "OCS NTSC",
  199.     NULL
  200. };
  201. MODULE STRPTR CPUOptions[CPUS + 2] =
  202. {   (STRPTR) "68020",
  203.     (STRPTR) "68030",
  204.     (STRPTR) "68040",
  205.     (STRPTR) "68060",
  206.     (STRPTR) "PowerPC",
  207.     NULL
  208. };
  209. MODULE STRPTR ModelOptions[MODELS + 2] =
  210. {   (STRPTR) "A500",
  211.     (STRPTR) "A500+",
  212.     (STRPTR) "A600",
  213.     (STRPTR) "A1000",
  214.     (STRPTR) "A1200",
  215.     (STRPTR) "A1500",
  216.     (STRPTR) "A2000",
  217.     (STRPTR) "A2500",
  218.     (STRPTR) "A3000",
  219.     (STRPTR) "A4000",
  220.     (STRPTR) "CDTV",
  221.     (STRPTR) "CD32",
  222.     (STRPTR) "DraCo",
  223.     (STRPTR) "Emulator",
  224.     NULL
  225. };
  226.  
  227. IMPORT ULONG               fillcolour, offset;
  228. IMPORT TEXT                aslresult[PATHNAMEFIELD + 1],
  229.                            weekdaystring[10],
  230.                            datestring[10],
  231.                            timestring[9],
  232.                            cpuline[VLONGFIELD + 1];
  233. IMPORT struct SharedStruct shared;
  234. IMPORT TEXT                IOBuffer[LONGESTFIELD + 1];
  235. IMPORT SBYTE               page;
  236. IMPORT ABOOL               certified, fillwindows;
  237. IMPORT TEXT                string[PATHNAMEFIELD + 1];
  238. IMPORT struct Window*      MainWindowPtr;
  239. IMPORT struct Menu*        MenuPtr;
  240. IMPORT struct Screen*      ScreenPtr;
  241. IMPORT struct Library*     TextEditorBase;
  242. IMPORT Object*             WinObject[FUNCTIONS + 1];
  243. IMPORT struct VisualInfo*  VisualInfoPtr;
  244.  
  245. /* report.textfield[] are:
  246.    0: brief bug description
  247.    1: bug generation procedure or example
  248.    2: if this works differently on other versions or hardware, explain
  249.    3: what developer is doing in that area of HW or SW
  250.    4: related problems
  251.    5: enhancement request */
  252.  
  253. AGLOBAL void report1(void)
  254. {   struct Hook Hook1Struct;
  255.  
  256.     InitHook(&Hook1Struct, Hook1Func, NULL);
  257.  
  258.     /* Create the window object. */
  259.     lockscreen();
  260.  
  261. if (!(WinObject[1] =
  262. NewObject
  263. (   WINDOW_GetClass(),                    NULL,
  264.     WA_PubScreen,                         ScreenPtr,
  265.     WA_ScreenTitle,                       "Report+",
  266.     WA_Title,                             "Report+: Bug Report Editor (Page 1 of 2)",
  267.     WA_Activate,                          TRUE,
  268.     WA_DepthGadget,                       TRUE,
  269.     WA_DragBar,                           TRUE,
  270.     WA_CloseGadget,                       TRUE,
  271.     WA_SizeGadget,                        TRUE,
  272.     WA_IDCMP,                             IDCMP_RAWKEY,
  273.     WINDOW_IDCMPHook,                     &Hook1Struct,
  274.     WINDOW_IDCMPHookBits,                 IDCMP_RAWKEY,
  275.     WINDOW_MenuStrip,                     MenuPtr,
  276.     WINDOW_Position,                      WPOS_CENTERSCREEN,
  277.     WINDOW_ParentGroup,                   report_gadgets[GID_1_LY2] =
  278.     NewObject
  279.     (   LAYOUT_GetClass(),                NULL,
  280.         LAYOUT_Orientation,               LAYOUT_ORIENT_VERT,
  281.         LAYOUT_SpaceOuter,                TRUE,
  282.         LAYOUT_DeferLayout,               TRUE,
  283.         LAYOUT_AddChild,
  284.         NewObject
  285.         (   LAYOUT_GetClass(),            NULL,
  286.             LAYOUT_Orientation,           LAYOUT_ORIENT_VERT,
  287.             LAYOUT_SpaceOuter,            TRUE,
  288.             LAYOUT_DeferLayout,           TRUE,
  289.             LAYOUT_BevelStyle,            BVS_FIELD,
  290.             LAYOUT_AddChild,
  291.             NewObject
  292.             (   LAYOUT_GetClass(),            NULL,
  293.                 LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  294.                 LAYOUT_DeferLayout,           TRUE,
  295.                 LAYOUT_BevelStyle,            BVS_NONE,
  296.                 LAYOUT_AddChild,
  297.                 NewObject
  298.                 (   LAYOUT_GetClass(),    NULL,
  299.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  300.                     LAYOUT_DeferLayout,   TRUE,
  301.                     LAYOUT_VertAlignment, LALIGN_CENTER,
  302.                     LAYOUT_HorizAlignment,LALIGN_CENTER,
  303.                     LAYOUT_BevelStyle,    BVS_NONE,
  304.                     LAYOUT_AddImage,
  305.                     NewObject
  306.                     (   LABEL_GetClass(),     NULL,
  307.                         LABEL_Text,           "_Summary:",
  308.                         LABEL_Justification,  LJ_RIGHT,
  309.                     TAG_END),
  310.                 TAG_END),
  311.                 CHILD_WeightedWidth,      30,
  312.                 CHILD_MinWidth,           160,
  313.                 LAYOUT_AddChild,          report_gadgets[GID_1_ST1] =
  314.                 NewObject
  315.                 (   STRING_GetClass(),    NULL,
  316.                     GA_ID,                GID_1_ST1,
  317.                     GA_TabCycle,          TRUE,
  318.                     GA_RelVerify,         TRUE,
  319.                     STRINGA_TextVal,      report.summary,
  320.                     STRINGA_MinVisible,   15,
  321.                     STRINGA_MaxChars,     LONGFIELD,
  322.                 TAG_END),
  323.                 CHILD_WeightedWidth,      70,
  324.                 CHILD_MinWidth,           400,
  325.             TAG_END),
  326.             CHILD_WeightedHeight,         0,
  327.             LAYOUT_AddChild,
  328.             NewObject
  329.             (   LAYOUT_GetClass(),            NULL,
  330.                 LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  331.                 LAYOUT_DeferLayout,           TRUE,
  332.                 LAYOUT_BevelStyle,            BVS_NONE,
  333.                 LAYOUT_AddChild,
  334.                 NewObject
  335.                 (   LAYOUT_GetClass(),        NULL,
  336.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  337.                     LAYOUT_DeferLayout,       TRUE,
  338.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  339.                     LAYOUT_HorizAlignment,    LALIGN_CENTER,
  340.                     LAYOUT_BevelStyle,        BVS_NONE,
  341.                     LAYOUT_AddImage,
  342.                     NewObject
  343.                     (   LABEL_GetClass(),     NULL,
  344.                         LABEL_Text,           "Email to:",
  345.                         LABEL_Justification,  LJ_RIGHT,
  346.                     TAG_END),
  347.                 TAG_END),
  348.                 CHILD_WeightedWidth,      30,
  349.                 CHILD_MinWidth,           160,
  350.                 LAYOUT_AddChild,          report_gadgets[GID_1_ST2] =
  351.                 NewObject
  352.                 (   STRING_GetClass(),    NULL,
  353.                     GA_ID,                GID_1_ST2,
  354.                     STRINGA_TextVal,      "",
  355.                     GA_ReadOnly,          TRUE,
  356.                 TAG_END),
  357.                 CHILD_WeightedWidth,      70,
  358.                 CHILD_MinWidth,           400,
  359.             TAG_END),
  360.             CHILD_WeightedHeight,         0,
  361.             LAYOUT_AddChild,
  362.             NewObject
  363.             (   LAYOUT_GetClass(),            NULL,
  364.                 LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  365.                 LAYOUT_DeferLayout,           TRUE,
  366.                 LAYOUT_BevelStyle,            BVS_NONE,
  367.                 LAYOUT_AddChild,
  368.                 NewObject
  369.                 (   LAYOUT_GetClass(),        NULL,
  370.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  371.                     LAYOUT_DeferLayout,       TRUE,
  372.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  373.                     LAYOUT_HorizAlignment,    LALIGN_CENTER,
  374.                     LAYOUT_BevelStyle,        BVS_NONE,
  375.                     LAYOUT_AddImage,
  376.                     NewObject
  377.                     (   LABEL_GetClass(),     NULL,
  378.                         LABEL_Text,           "_Type:",
  379.                         LABEL_Justification,  LJ_RIGHT,
  380.                     TAG_END),
  381.                 TAG_END),
  382.                 CHILD_WeightedWidth,      30,
  383.                 CHILD_MinWidth,           160,
  384.                 LAYOUT_AddChild,          report_gadgets[GID_1_CH1] =
  385.                 NewObject
  386.                 (   CHOOSER_GetClass(),   NULL,
  387.                     GA_ID,                GID_1_CH1,
  388.                     GA_RelVerify,         TRUE, // otherwise we won't hear the gadget
  389.                     CHOOSER_PopUp,        TRUE,
  390.                     CHOOSER_LabelArray,   TypeOptions,
  391.                     CHOOSER_Selected,     (WORD) report.type,
  392.                 TAG_END),
  393.                 CHILD_WeightedWidth,      70,
  394.                 CHILD_MinWidth,           400,
  395.             TAG_END),
  396.             CHILD_WeightedHeight,         0,
  397.             LAYOUT_AddChild,
  398.             NewObject
  399.             (   LAYOUT_GetClass(),            NULL,
  400.                 LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  401.                 LAYOUT_DeferLayout,           TRUE,
  402.                 LAYOUT_BevelStyle,            BVS_NONE,
  403.                 LAYOUT_AddChild,
  404.                 NewObject
  405.                 (   LAYOUT_GetClass(),        NULL,
  406.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  407.                     LAYOUT_DeferLayout,       TRUE,
  408.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  409.                     LAYOUT_HorizAlignment,    LALIGN_CENTER,
  410.                     LAYOUT_BevelStyle,        BVS_NONE,
  411.                     LAYOUT_AddImage,
  412.                     NewObject
  413.                     (   LABEL_GetClass(),     NULL,
  414.                         LABEL_Text,           "Severit_y:",
  415.                         LABEL_Justification,  LJ_RIGHT,
  416.                     TAG_END),
  417.                 TAG_END),
  418.                 CHILD_WeightedWidth,      30,
  419.                 CHILD_MinWidth,           160,
  420.                 LAYOUT_AddChild,          report_gadgets[GID_1_CH2] =
  421.                 NewObject
  422.                 (   CHOOSER_GetClass(),   NULL,
  423.                     GA_ID,                GID_1_CH2,
  424.                     GA_RelVerify,         TRUE, // otherwise we won't hear the gadget
  425.                     CHOOSER_PopUp,        TRUE,
  426.                     CHOOSER_LabelArray,   SeverityOptions,
  427.                     CHOOSER_Selected,     (WORD) report.severity,
  428.                 TAG_END),
  429.                 CHILD_WeightedWidth,      70,
  430.                 CHILD_MinWidth,           400,
  431.             TAG_END),
  432.             CHILD_WeightedHeight,         0,
  433.             LAYOUT_AddChild,
  434.             NewObject
  435.             (   LAYOUT_GetClass(),            NULL,
  436.                 LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  437.                 LAYOUT_DeferLayout,           TRUE,
  438.                 LAYOUT_BevelStyle,            BVS_NONE,
  439.                 LAYOUT_AddChild,
  440.                 NewObject
  441.                 (   LAYOUT_GetClass(),        NULL,
  442.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  443.                     LAYOUT_DeferLayout,       TRUE,
  444.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  445.                     LAYOUT_HorizAlignment,    LALIGN_CENTER,
  446.                     LAYOUT_BevelStyle,        BVS_NONE,
  447.                     LAYOUT_AddImage,
  448.                     NewObject
  449.                     (   LABEL_GetClass(),     NULL,
  450.                         LABEL_Text,           "_Debug tools/wedges:",
  451.                         LABEL_Justification,  LJ_RIGHT,
  452.                     TAG_END),
  453.                 TAG_END),
  454.                 CHILD_WeightedWidth,      30,
  455.                 CHILD_MinWidth,           160,
  456.                 LAYOUT_AddChild,          report_gadgets[GID_1_ST3] =
  457.                 NewObject
  458.                 (   STRING_GetClass(),    NULL,
  459.                     GA_ID,                GID_1_ST3,
  460.                     GA_TabCycle,          TRUE,
  461.                     GA_RelVerify,         TRUE,
  462.                     STRINGA_TextVal,      report.debug,
  463.                     STRINGA_MinVisible,   15,
  464.                     STRINGA_MaxChars,     LONGFIELD,
  465.                 TAG_END),
  466.                 CHILD_WeightedWidth,      70,
  467.                 CHILD_MinWidth,           400,
  468.             TAG_END),
  469.             CHILD_WeightedHeight,         0,
  470.             LAYOUT_AddChild,
  471.             NewObject
  472.             (   LAYOUT_GetClass(),            NULL,
  473.                 LAYOUT_Orientation,           LAYOUT_ORIENT_HORIZ,
  474.                 LAYOUT_DeferLayout,           TRUE,
  475.                 LAYOUT_BevelStyle,            BVS_NONE,
  476.                 LAYOUT_AddChild,
  477.                 NewObject
  478.                 (   LAYOUT_GetClass(),        NULL,
  479.                     LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  480.                     LAYOUT_DeferLayout,       TRUE,
  481.                     LAYOUT_VertAlignment,     LALIGN_CENTER,
  482.                     LAYOUT_HorizAlignment,    LALIGN_CENTER,
  483.                     LAYOUT_BevelStyle,        BVS_NONE,
  484.                     LAYOUT_AddImage,
  485.                     NewObject
  486.                     (   LABEL_GetClass(),     NULL,
  487.                         LABEL_Text,           "_Program pathname:",
  488.                         LABEL_Justification,  LJ_RIGHT,
  489.                     TAG_END),
  490.                 TAG_END),
  491.                 CHILD_WeightedWidth,      30,
  492.                 CHILD_MinWidth,           160,
  493.                 LAYOUT_AddChild,
  494.                 NewObject
  495.                 (   LAYOUT_GetClass(),    NULL,
  496.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  497.                     LAYOUT_DeferLayout,   TRUE,
  498.                     LAYOUT_BevelStyle,    BVS_NONE,
  499.                     LAYOUT_AddChild,      report_gadgets[GID_1_ST7] =
  500.                     NewObject
  501.                     (   STRING_GetClass(),NULL,
  502.                         GA_ID,            GID_1_ST7,
  503.                         GA_TabCycle,      TRUE,
  504.                         STRINGA_TextVal,  report.pp,
  505.                         STRINGA_MaxChars, PATHNAMEFIELD,
  506.                     TAG_END),
  507.                     LAYOUT_AddChild,      report_gadgets[GID_1_BU4] =
  508.                     NewObject
  509.                     (   NULL,             "button.gadget",
  510.                         GA_ID,            GID_1_BU4,
  511.                         GA_RelVerify,     TRUE,
  512.                         BUTTON_AutoButton,BAG_POPFILE,
  513.                     TAG_END),
  514.                 CHILD_WeightedWidth,      0,
  515.                 TAG_END),
  516.                 CHILD_WeightedWidth,      70,
  517.                 CHILD_MinWidth,           400,
  518.             TAG_END),
  519.             CHILD_WeightedHeight,         0,
  520.         TAG_END),
  521.         CHILD_WeightedHeight,     0,
  522.         LAYOUT_AddChild,
  523.         NewObject
  524.         (   LAYOUT_GetClass(),    NULL,
  525.             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  526.             LAYOUT_DeferLayout,   TRUE,
  527.             LAYOUT_BevelStyle,    BVS_NONE,
  528.             LAYOUT_AddChild,
  529.             NewObject
  530.             (   LAYOUT_GetClass(),    NULL,
  531.                 LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  532.                 LAYOUT_DeferLayout,   TRUE,
  533.                 LAYOUT_BevelStyle,    BVS_NONE,
  534.                 LAYOUT_AddChild,
  535.                 NewObject
  536.                 (   LAYOUT_GetClass(),    NULL,
  537.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  538.                     LAYOUT_DeferLayout,   TRUE,
  539.                     LAYOUT_VertAlignment, LALIGN_CENTER,
  540.                     LAYOUT_HorizAlignment,LALIGN_CENTER,
  541.                     LAYOUT_BevelStyle,    BVS_NONE,
  542.                     LAYOUT_AddImage,
  543.                     NewObject
  544.                     (   LABEL_GetClass(),     NULL,
  545.                         LABEL_Text,           "Versions:",
  546.                         LABEL_Justification,  LJ_RIGHT,
  547.                     TAG_END),
  548.                 TAG_END),
  549.                 CHILD_WeightedHeight,     0,
  550.                 LAYOUT_AddChild,
  551.                 NewObject
  552.                 (   LAYOUT_GetClass(),    NULL,
  553.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  554.                     LAYOUT_SpaceOuter,    TRUE,
  555.                     LAYOUT_DeferLayout,   TRUE,
  556.                     LAYOUT_VertAlignment, LALIGN_CENTER,
  557.                     LAYOUT_HorizAlignment,LALIGN_CENTER,
  558.                     LAYOUT_BevelStyle,    BVS_FIELD,
  559.                     LAYOUT_AddChild,
  560.                     NewObject
  561.                     (   LAYOUT_GetClass(),    NULL,
  562.                         LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  563.                         LAYOUT_DeferLayout,   TRUE,
  564.                         LAYOUT_VertAlignment, LALIGN_CENTER,
  565.                         LAYOUT_HorizAlignment,LALIGN_CENTER,
  566.                         LAYOUT_BevelStyle,    BVS_NONE,
  567.                         LAYOUT_AddChild,
  568.                         NewObject
  569.                         (   LAYOUT_GetClass(),    NULL,
  570.                             LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  571.                             LAYOUT_DeferLayout,   TRUE,
  572.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  573.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  574.                             LAYOUT_BevelStyle,    BVS_NONE,
  575.                             LAYOUT_AddImage,
  576.                             NewObject
  577.                             (   LABEL_GetClass(),     NULL,
  578.                                 LABEL_Text,           "_KS:",
  579.                                 LABEL_Justification,  LJ_RIGHT,
  580.                             TAG_END),
  581.                         TAG_END),
  582.                         LAYOUT_AddChild,
  583.                         NewObject
  584.                         (   LAYOUT_GetClass(),    NULL,
  585.                             LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  586.                             LAYOUT_DeferLayout,   TRUE,
  587.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  588.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  589.                             LAYOUT_BevelStyle,    BVS_NONE,
  590.                             LAYOUT_AddImage,
  591.                             NewObject
  592.                             (   LABEL_GetClass(),     NULL,
  593.                                 LABEL_Text,           "_WB:",
  594.                                 LABEL_Justification,  LJ_RIGHT,
  595.                             TAG_END),
  596.                         TAG_END),
  597.                         LAYOUT_AddChild,
  598.                         NewObject
  599.                         (   LAYOUT_GetClass(),    NULL,
  600.                             LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  601.                             LAYOUT_DeferLayout,   TRUE,
  602.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  603.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  604.                             LAYOUT_BevelStyle,    BVS_NONE,
  605.                             LAYOUT_AddImage,
  606.                             NewObject
  607.                             (   LABEL_GetClass(),     NULL,
  608.                                 LABEL_Text,           "Pr_ogram:",
  609.                                 LABEL_Justification,  LJ_RIGHT,
  610.                             TAG_END),
  611.                         TAG_END),
  612.                     TAG_END),
  613.                     LAYOUT_AddChild,
  614.                     NewObject
  615.                     (   LAYOUT_GetClass(),    NULL,
  616.                         LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  617.                         LAYOUT_DeferLayout,   TRUE,
  618.                         LAYOUT_VertAlignment, LALIGN_CENTER,
  619.                         LAYOUT_HorizAlignment,LALIGN_CENTER,
  620.                         LAYOUT_BevelStyle,    BVS_NONE,
  621.                         LAYOUT_AddChild,          report_gadgets[GID_1_ST4] =
  622.                         NewObject
  623.                         (   STRING_GetClass(),    NULL,
  624.                             GA_ID,                GID_1_ST4,
  625.                             GA_TabCycle,          TRUE,
  626.                             GA_RelVerify,         TRUE,
  627.                             STRINGA_TextVal,      report.ks,
  628.                             STRINGA_MinVisible,   3,
  629.                             STRINGA_MaxChars,     6,
  630.                         TAG_END),
  631.                         LAYOUT_AddChild,          report_gadgets[GID_1_ST5] =
  632.                         NewObject
  633.                         (   STRING_GetClass(),    NULL,
  634.                             GA_ID,                GID_1_ST5,
  635.                             GA_TabCycle,          TRUE,
  636.                             GA_RelVerify,         TRUE,
  637.                             STRINGA_TextVal,      report.wb,
  638.                             STRINGA_MinVisible,   3,
  639.                             STRINGA_MaxChars,     6,
  640.                         TAG_END),
  641.                         LAYOUT_AddChild,          report_gadgets[GID_1_ST6] =
  642.                         NewObject
  643.                         (   STRING_GetClass(),    NULL,
  644.                             GA_ID,                GID_1_ST6,
  645.                             GA_TabCycle,          TRUE,
  646.                             GA_RelVerify,         TRUE,
  647.                             STRINGA_TextVal,      report.pv,
  648.                             STRINGA_MinVisible,   3,
  649.                             STRINGA_MaxChars,     LONGFIELD,
  650.                         TAG_END),
  651.                     TAG_END),
  652.                 TAG_END),
  653.                 CHILD_WeightedHeight,     0,
  654.                 LAYOUT_AddChild,
  655.                 NewObject
  656.                 (   LAYOUT_GetClass(),    NULL,
  657.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  658.                     LAYOUT_DeferLayout,   TRUE,
  659.                     LAYOUT_VertAlignment, LALIGN_CENTER,
  660.                     LAYOUT_HorizAlignment,LALIGN_CENTER,
  661.                     LAYOUT_BevelStyle,    BVS_NONE,
  662.                     LAYOUT_AddImage,
  663.                     NewObject
  664.                     (   LABEL_GetClass(),     NULL,
  665.                         LABEL_Text,           "Subsystem:",
  666.                         LABEL_Justification,  LJ_RIGHT,
  667.                     TAG_END),
  668.                 TAG_END),
  669.                 CHILD_WeightedHeight,      0,
  670.                 LAYOUT_AddChild,           report_gadgets[GID_1_LB1] =
  671.                 NewObject
  672.                 (   LISTBROWSER_GetClass(),NULL,
  673.                     GA_ID,                 GID_1_LB1,
  674.                     GA_RelVerify,          TRUE,
  675.                     LISTBROWSER_Selected,  report.subsystem,
  676.                     LISTBROWSER_Labels,    (ULONG) &SubsystemList,
  677.                     LISTBROWSER_MinVisible,3,
  678.                     LISTBROWSER_ShowSelected,TRUE,
  679.                 TAG_END),
  680.             TAG_END),
  681.             CHILD_WeightedWidth,      30,
  682.             CHILD_MinWidth,           160,
  683.             LAYOUT_AddChild,
  684.             NewObject
  685.             (   LAYOUT_GetClass(),    NULL,
  686.                 LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  687.                 LAYOUT_DeferLayout,   TRUE,
  688.                 LAYOUT_BevelStyle,    BVS_NONE,
  689.                 LAYOUT_AddChild,
  690.                 NewObject
  691.                 (   LAYOUT_GetClass(),    NULL,
  692.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  693.                     LAYOUT_DeferLayout,   TRUE,
  694.                     LAYOUT_VertAlignment, LALIGN_CENTER,
  695.                     LAYOUT_HorizAlignment,LALIGN_CENTER,
  696.                     LAYOUT_BevelStyle,    BVS_NONE,
  697.                     LAYOUT_AddImage,
  698.                     NewObject
  699.                     (   LABEL_GetClass(),     NULL,
  700.                         LABEL_Text,           "3rd Party Product:",
  701.                         LABEL_Justification,  LJ_RIGHT,
  702.                     TAG_END),
  703.                 TAG_END),
  704.                 CHILD_WeightedHeight,      0,
  705.                 LAYOUT_AddChild,
  706.                 NewObject
  707.                 (   LAYOUT_GetClass(),    NULL,
  708.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  709.                     LAYOUT_SpaceOuter,    TRUE,
  710.                     LAYOUT_DeferLayout,   TRUE,
  711.                     LAYOUT_VertAlignment, LALIGN_CENTER,
  712.                     LAYOUT_HorizAlignment,LALIGN_CENTER,
  713.                     LAYOUT_BevelStyle,    BVS_FIELD,
  714.                     LAYOUT_AddChild,
  715.                     NewObject
  716.                     (   LAYOUT_GetClass(),    NULL,
  717.                         LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  718.                         LAYOUT_DeferLayout,   TRUE,
  719.                         LAYOUT_VertAlignment, LALIGN_CENTER,
  720.                         LAYOUT_HorizAlignment,LALIGN_CENTER,
  721.                         LAYOUT_BevelStyle,    BVS_NONE,
  722.                         LAYOUT_AddChild,
  723.                         NewObject
  724.                         (   LAYOUT_GetClass(),    NULL,
  725.                             LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  726.                             LAYOUT_DeferLayout,   TRUE,
  727.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  728.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  729.                             LAYOUT_BevelStyle,    BVS_NONE,
  730.                             LAYOUT_AddImage,
  731.                             NewObject
  732.                             (   LABEL_GetClass(),     NULL,
  733.                                 LABEL_Text,           "Manufactu_rer:",
  734.                                 LABEL_Justification,  LJ_RIGHT,
  735.                             TAG_END),
  736.                         TAG_END),
  737.                         LAYOUT_AddChild,
  738.                         NewObject
  739.                         (   LAYOUT_GetClass(),    NULL,
  740.                             LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  741.                             LAYOUT_DeferLayout,   TRUE,
  742.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  743.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  744.                             LAYOUT_BevelStyle,    BVS_NONE,
  745.                             LAYOUT_AddImage,
  746.                             NewObject
  747.                             (   LABEL_GetClass(),     NULL,
  748.                                 LABEL_Text,           "N_ame:",
  749.                                 LABEL_Justification,  LJ_RIGHT,
  750.                             TAG_END),
  751.                         TAG_END),
  752.                         LAYOUT_AddChild,
  753.                         NewObject
  754.                         (   LAYOUT_GetClass(),    NULL,
  755.                             LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  756.                             LAYOUT_DeferLayout,   TRUE,
  757.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  758.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  759.                             LAYOUT_BevelStyle,    BVS_NONE,
  760.                             LAYOUT_AddImage,
  761.                             NewObject
  762.                             (   LABEL_GetClass(),     NULL,
  763.                                 LABEL_Text,           "_Version:",
  764.                                 LABEL_Justification,  LJ_RIGHT,
  765.                             TAG_END),
  766.                         TAG_END),
  767.                     TAG_END),
  768.                     LAYOUT_AddChild,
  769.                     NewObject
  770.                     (   LAYOUT_GetClass(),    NULL,
  771.                         LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  772.                         LAYOUT_DeferLayout,   TRUE,
  773.                         LAYOUT_VertAlignment, LALIGN_CENTER,
  774.                         LAYOUT_HorizAlignment,LALIGN_CENTER,
  775.                         LAYOUT_BevelStyle,    BVS_NONE,
  776.                         LAYOUT_AddChild,          report_gadgets[GID_1_ST8] =
  777.                         NewObject
  778.                         (   STRING_GetClass(),    NULL,
  779.                             GA_ID,                GID_1_ST8,
  780.                             GA_TabCycle,          TRUE,
  781.                             GA_RelVerify,         TRUE,
  782.                             STRINGA_TextVal,      report.thirdmanuf,
  783.                             STRINGA_MaxChars,     MEDFIELD,
  784.                             STRINGA_MinVisible,   10,
  785.                         TAG_END),
  786.                         LAYOUT_AddChild,          report_gadgets[GID_1_ST9] =
  787.                         NewObject
  788.                         (   STRING_GetClass(),    NULL,
  789.                             GA_ID,                GID_1_ST9,
  790.                             GA_TabCycle,          TRUE,
  791.                             GA_RelVerify,         TRUE,
  792.                             STRINGA_TextVal,      report.thirdname,
  793.                             STRINGA_MaxChars,     MEDFIELD,
  794.                             STRINGA_MinVisible,   10,
  795.                         TAG_END),
  796.                         LAYOUT_AddChild,          report_gadgets[GID_1_ST10] =
  797.                         NewObject
  798.                         (   STRING_GetClass(),    NULL,
  799.                             GA_ID,                GID_1_ST10,
  800.                             GA_TabCycle,          TRUE,
  801.                             GA_RelVerify,         TRUE,
  802.                             STRINGA_TextVal,      report.thirdver,
  803.                             STRINGA_MaxChars,     MEDFIELD,
  804.                             STRINGA_MinVisible,   10,
  805.                         TAG_END),
  806.                     TAG_END),
  807.                 TAG_END),
  808.                 LAYOUT_AddChild,
  809.                 NewObject
  810.                 (   LAYOUT_GetClass(),    NULL,
  811.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  812.                     LAYOUT_DeferLayout,   TRUE,
  813.                     LAYOUT_VertAlignment, LALIGN_CENTER,
  814.                     LAYOUT_HorizAlignment,LALIGN_CENTER,
  815.                     LAYOUT_BevelStyle,    BVS_NONE,
  816.                     LAYOUT_AddImage,
  817.                     NewObject
  818.                     (   LABEL_GetClass(),     NULL,
  819.                         LABEL_Text,           "Configuration:",
  820.                         LABEL_Justification,  LJ_RIGHT,
  821.                     TAG_END),
  822.                 TAG_END),
  823.                 CHILD_WeightedHeight,      0,
  824.                 LAYOUT_AddChild,
  825.                 NewObject
  826.                 (   LAYOUT_GetClass(),    NULL,
  827.                     LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  828.                     LAYOUT_SpaceOuter,    TRUE,
  829.                     LAYOUT_DeferLayout,   TRUE,
  830.                     LAYOUT_VertAlignment, LALIGN_CENTER,
  831.                     LAYOUT_HorizAlignment,LALIGN_CENTER,
  832.                     LAYOUT_BevelStyle,    BVS_FIELD,
  833.                     LAYOUT_AddChild,
  834.                     NewObject
  835.                     (   LAYOUT_GetClass(),    NULL,
  836.                         LAYOUT_Orientation,   LAYOUT_ORIENT_VERT,
  837.                         LAYOUT_DeferLayout,   TRUE,
  838.                         LAYOUT_VertAlignment, LALIGN_CENTER,
  839.                         LAYOUT_HorizAlignment,LALIGN_CENTER,
  840.                         LAYOUT_BevelStyle,    BVS_NONE,
  841.                         LAYOUT_AddChild,
  842.                         NewObject
  843.                         (   LAYOUT_GetClass(),    NULL,
  844.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  845.                             LAYOUT_DeferLayout,   TRUE,
  846.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  847.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  848.                             LAYOUT_BevelStyle,    BVS_NONE,
  849.                             LAYOUT_AddChild,
  850.                             NewObject
  851.                             (   LAYOUT_GetClass(),    NULL,
  852.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  853.                                 LAYOUT_DeferLayout,   TRUE,
  854.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  855.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  856.                                 LAYOUT_BevelStyle,    BVS_NONE,
  857.                                 LAYOUT_AddImage,
  858.                                 NewObject
  859.                                 (   LABEL_GetClass(),     NULL,
  860.                                     LABEL_Text,           "_Model:",
  861.                                     LABEL_Justification,  LJ_RIGHT,
  862.                                 TAG_END),
  863.                             TAG_END),
  864.                             CHILD_WeightedWidth,      50,
  865.                             LAYOUT_AddChild,          report_gadgets[GID_1_CH3] =
  866.                             NewObject
  867.                             (   CHOOSER_GetClass(),   NULL,
  868.                                 GA_ID,                GID_1_CH3,
  869.                                 GA_RelVerify,         TRUE,
  870.                                 CHOOSER_PopUp,        TRUE,
  871.                                 CHOOSER_LabelArray,   ModelOptions,
  872.                                 CHOOSER_Selected,     (WORD) report.model,
  873.                                 CHOOSER_MaxLabels,    MODELS + 1,
  874.                             TAG_END),
  875.                             CHILD_WeightedWidth,      50,
  876.                         TAG_END),
  877.                         LAYOUT_AddChild,
  878.                         NewObject
  879.                         (   LAYOUT_GetClass(),    NULL,
  880.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  881.                             LAYOUT_DeferLayout,   TRUE,
  882.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  883.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  884.                             LAYOUT_BevelStyle,    BVS_NONE,
  885.                             LAYOUT_AddChild,
  886.                             NewObject
  887.                             (   LAYOUT_GetClass(),    NULL,
  888.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  889.                                 LAYOUT_DeferLayout,   TRUE,
  890.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  891.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  892.                                 LAYOUT_BevelStyle,    BVS_NONE,
  893.                                 LAYOUT_AddImage,
  894.                                 NewObject
  895.                                 (   LABEL_GetClass(),     NULL,
  896.                                     LABEL_Text,           "CP_U:",
  897.                                     LABEL_Justification,  LJ_RIGHT,
  898.                                 TAG_END),
  899.                             TAG_END),
  900.                             CHILD_WeightedWidth,      50,
  901.                             LAYOUT_AddChild,          report_gadgets[GID_1_CH4] =
  902.                             NewObject
  903.                             (   CHOOSER_GetClass(),   NULL,
  904.                                 GA_ID,                GID_1_CH4,
  905.                                 GA_RelVerify,         TRUE,
  906.                                 CHOOSER_PopUp,        TRUE,
  907.                                 CHOOSER_LabelArray,   CPUOptions,
  908.                                 CHOOSER_Selected,     (WORD) report.cpu,
  909.                             TAG_END),
  910.                             CHILD_WeightedWidth,      50,
  911.                         TAG_END),
  912.                         LAYOUT_AddChild,
  913.                         NewObject
  914.                         (   LAYOUT_GetClass(),    NULL,
  915.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  916.                             LAYOUT_DeferLayout,   TRUE,
  917.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  918.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  919.                             LAYOUT_BevelStyle,    BVS_NONE,
  920.                             LAYOUT_AddChild,
  921.                             NewObject
  922.                             (   LAYOUT_GetClass(),    NULL,
  923.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  924.                                 LAYOUT_DeferLayout,   TRUE,
  925.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  926.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  927.                                 LAYOUT_BevelStyle,    BVS_NONE,
  928.                                 LAYOUT_AddImage,
  929.                                 NewObject
  930.                                 (   LABEL_GetClass(),     NULL,
  931.                                     LABEL_Text,           "Ch_ipset Type:",
  932.                                     LABEL_Justification,  LJ_RIGHT,
  933.                                 TAG_END),
  934.                             TAG_END),
  935.                             CHILD_WeightedWidth,      50,
  936.                             LAYOUT_AddChild,          report_gadgets[GID_1_CH5] =
  937.                             NewObject
  938.                             (   CHOOSER_GetClass(),   NULL,
  939.                                 GA_ID,                GID_1_CH5,
  940.                                 GA_RelVerify,         TRUE,
  941.                                 CHOOSER_PopUp,        TRUE,
  942.                                 CHOOSER_LabelArray,   AgnusOptions,
  943.                                 CHOOSER_Selected,     (WORD) report.agnus,
  944.                             TAG_END),
  945.                             CHILD_WeightedWidth,      50,
  946.                         TAG_END),
  947.                         LAYOUT_AddChild,
  948.                         NewObject
  949.                         (   LAYOUT_GetClass(),    NULL,
  950.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  951.                             LAYOUT_DeferLayout,   TRUE,
  952.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  953.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  954.                             LAYOUT_BevelStyle,    BVS_NONE,
  955.                             LAYOUT_AddChild,
  956.                             NewObject
  957.                             (   LAYOUT_GetClass(),    NULL,
  958.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  959.                                 LAYOUT_DeferLayout,   TRUE,
  960.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  961.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  962.                                 LAYOUT_BevelStyle,    BVS_NONE,
  963.                                 LAYOUT_AddImage,
  964.                                 NewObject
  965.                                 (   LABEL_GetClass(),     NULL,
  966.                                     LABEL_Text,           "_No. of floppies:",
  967.                                     LABEL_Justification,  LJ_RIGHT,
  968.                                 TAG_END),
  969.                             TAG_END),
  970.                             CHILD_WeightedWidth,      50,
  971.                             LAYOUT_AddChild,          report_gadgets[GID_1_IN1] =
  972.                             NewObject
  973.                             (   INTEGER_GetClass(),   NULL,
  974.                                 GA_ID,                GID_1_IN1,
  975.                                 GA_RelVerify,         TRUE,
  976.                                 GA_TabCycle,          TRUE,
  977.                                 INTEGER_Number,       report.floppies,
  978.                                 INTEGER_Minimum,      0,
  979.                                 INTEGER_Maximum,      4,
  980.                                 INTEGER_MinVisible,   1,
  981.                             TAG_END),
  982.                             CHILD_WeightedWidth,      50,
  983.                         TAG_END),
  984.                         LAYOUT_AddChild,
  985.                         NewObject
  986.                         (   LAYOUT_GetClass(),    NULL,
  987.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  988.                             LAYOUT_DeferLayout,   TRUE,
  989.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  990.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  991.                             LAYOUT_BevelStyle,    BVS_NONE,
  992.                             LAYOUT_AddChild,
  993.                             NewObject
  994.                             (   LAYOUT_GetClass(),    NULL,
  995.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  996.                                 LAYOUT_DeferLayout,   TRUE,
  997.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  998.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  999.                                 LAYOUT_BevelStyle,    BVS_NONE,
  1000.                                 LAYOUT_AddImage,
  1001.                                 NewObject
  1002.                                 (   LABEL_GetClass(),     NULL,
  1003.                                     LABEL_Text,           "_Chip RAM:",
  1004.                                     LABEL_Justification,  LJ_RIGHT,
  1005.                                 TAG_END),
  1006.                             TAG_END),
  1007.                             CHILD_WeightedWidth,      50,
  1008.                             LAYOUT_AddChild,
  1009.                             NewObject
  1010.                             (   LAYOUT_GetClass(),    NULL,
  1011.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1012.                                 LAYOUT_DeferLayout,   TRUE,
  1013.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  1014.                                 LAYOUT_BevelStyle,    BVS_NONE,
  1015.                                 LAYOUT_AddChild,          report_gadgets[GID_1_ST11] =
  1016.                                 NewObject
  1017.                                 (   STRING_GetClass(),    NULL,
  1018.                                     GA_ID,                GID_1_ST11,
  1019.                                     GA_RelVerify,         TRUE,
  1020.                                     GA_TabCycle,          TRUE,
  1021.                                     STRINGA_TextVal,      report.chipram,
  1022.                                     STRINGA_MaxChars,     4,
  1023.                                 TAG_END),
  1024.                                 LAYOUT_AddImage,
  1025.                                 NewObject
  1026.                                 (   LABEL_GetClass(),     NULL,
  1027.                                     LABEL_Text,           "Mb",
  1028.                                     LABEL_Justification,  LJ_RIGHT,
  1029.                                 TAG_END),
  1030.                                 CHILD_WeightedWidth,      0,
  1031.                             TAG_END),
  1032.                             CHILD_WeightedWidth,          50,
  1033.                         TAG_END),
  1034.                         LAYOUT_AddChild,
  1035.                         NewObject
  1036.                         (   LAYOUT_GetClass(),    NULL,
  1037.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1038.                             LAYOUT_DeferLayout,   TRUE,
  1039.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  1040.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  1041.                             LAYOUT_BevelStyle,    BVS_NONE,
  1042.                             LAYOUT_AddChild,
  1043.                             NewObject
  1044.                             (   LAYOUT_GetClass(),    NULL,
  1045.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1046.                                 LAYOUT_DeferLayout,   TRUE,
  1047.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  1048.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  1049.                                 LAYOUT_BevelStyle,    BVS_NONE,
  1050.                                 LAYOUT_AddImage,
  1051.                                 NewObject
  1052.                                 (   LABEL_GetClass(),     NULL,
  1053.                                     LABEL_Text,           "Slow_/fast RAM:",
  1054.                                     LABEL_Justification,  LJ_RIGHT,
  1055.                                 TAG_END),
  1056.                             TAG_END),
  1057.                             CHILD_WeightedWidth,      50,
  1058.                             LAYOUT_AddChild,
  1059.                             NewObject
  1060.                             (   LAYOUT_GetClass(),    NULL,
  1061.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1062.                                 LAYOUT_DeferLayout,   TRUE,
  1063.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  1064.                                 LAYOUT_BevelStyle,    BVS_NONE,
  1065.                                 LAYOUT_AddChild,          report_gadgets[GID_1_ST12] =
  1066.                                 NewObject
  1067.                                 (   STRING_GetClass(),    NULL,
  1068.                                     GA_ID,                GID_1_ST12,
  1069.                                     GA_RelVerify,         TRUE,
  1070.                                     GA_TabCycle,          TRUE,
  1071.                                     STRINGA_TextVal,      report.fastram,
  1072.                                     STRINGA_MaxChars,     4,
  1073.                                 TAG_END),
  1074.                                 LAYOUT_AddImage,
  1075.                                 NewObject
  1076.                                 (   LABEL_GetClass(),     NULL,
  1077.                                     LABEL_Text,           "Mb",
  1078.                                     LABEL_Justification,  LJ_RIGHT,
  1079.                                 TAG_END),
  1080.                                 CHILD_WeightedWidth,      0,
  1081.                             TAG_END),
  1082.                             CHILD_WeightedWidth,          50,
  1083.                         TAG_END),
  1084.                         LAYOUT_AddChild,
  1085.                         NewObject
  1086.                         (   LAYOUT_GetClass(),    NULL,
  1087.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1088.                             LAYOUT_DeferLayout,   TRUE,
  1089.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  1090.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  1091.                             LAYOUT_BevelStyle,    BVS_NONE,
  1092.                             LAYOUT_AddChild,
  1093.                             NewObject
  1094.                             (   LAYOUT_GetClass(),    NULL,
  1095.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1096.                                 LAYOUT_DeferLayout,   TRUE,
  1097.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  1098.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  1099.                                 LAYOUT_BevelStyle,    BVS_NONE,
  1100.                                 LAYOUT_AddImage,
  1101.                                 NewObject
  1102.                                 (   LABEL_GetClass(),     NULL,
  1103.                                     LABEL_Text,           "_HD controller:",
  1104.                                     LABEL_Justification,  LJ_RIGHT,
  1105.                                 TAG_END),
  1106.                             TAG_END),
  1107.                             CHILD_WeightedWidth,      50,
  1108.                             LAYOUT_AddChild,          report_gadgets[GID_1_ST13] =
  1109.                             NewObject
  1110.                             (   STRING_GetClass(),    NULL,
  1111.                                 GA_ID,                GID_1_ST13,
  1112.                                 GA_RelVerify,         TRUE,
  1113.                                 GA_TabCycle,          TRUE,
  1114.                                 STRINGA_TextVal,      report.hard,
  1115.                                 STRINGA_MaxChars,     MEDFIELD,
  1116.                             TAG_END),
  1117.                             CHILD_WeightedWidth,      50,
  1118.                         TAG_END),
  1119.                         LAYOUT_AddChild,
  1120.                         NewObject
  1121.                         (   LAYOUT_GetClass(),    NULL,
  1122.                             LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1123.                             LAYOUT_DeferLayout,   TRUE,
  1124.                             LAYOUT_VertAlignment, LALIGN_CENTER,
  1125.                             LAYOUT_HorizAlignment,LALIGN_CENTER,
  1126.                             LAYOUT_BevelStyle,    BVS_NONE,
  1127.                             LAYOUT_AddChild,
  1128.                             NewObject
  1129.                             (   LAYOUT_GetClass(),    NULL,
  1130.                                 LAYOUT_Orientation,   LAYOUT_ORIENT_HORIZ,
  1131.                                 LAYOUT_DeferLayout,   TRUE,
  1132.                                 LAYOUT_VertAlignment, LALIGN_CENTER,
  1133.                                 LAYOUT_HorizAlignment,LALIGN_CENTER,
  1134.                                 LAYOUT_BevelStyle,    BVS_NONE,
  1135.                                 LAYOUT_AddImage,
  1136.                                 NewObject
  1137.                                 (   LABEL_GetClass(),     NULL,
  1138.                                     LABEL_Text,           "E_xpansion cards:",
  1139.                                     LABEL_Justification,  LJ_RIGHT,
  1140.                                 TAG_END),
  1141.                             TAG_END),
  1142.                             CHILD_WeightedWidth,      50,
  1143.                             LAYOUT_AddChild,          report_gadgets[GID_1_ST14] =
  1144.                             NewObject
  1145.                             (   STRING_GetClass(),    NULL,
  1146.                                 GA_ID,                GID_1_ST14,
  1147.                                 GA_RelVerify,         TRUE,
  1148.                                 GA_TabCycle,          TRUE,
  1149.                                 STRINGA_TextVal,      report.expansion,
  1150.                                 STRINGA_MaxChars,     LONGFIELD,
  1151.                             TAG_END),
  1152.                             CHILD_WeightedWidth,      50,
  1153.                         TAG_END),
  1154.                     TAG_END),
  1155.                 TAG_END),
  1156.             TAG_END),
  1157.             CHILD_WeightedWidth,      70,
  1158.         TAG_END),
  1159.         LAYOUT_AddChild,
  1160.         NewObject
  1161.         (   LAYOUT_GetClass(),        NULL,
  1162.             LAYOUT_Orientation,       LAYOUT_ORIENT_HORIZ,
  1163.             LAYOUT_DeferLayout,       TRUE,
  1164.             LAYOUT_BevelStyle,        BVS_NONE,
  1165.             LAYOUT_AddChild,          report_gadgets[GID_1_BU2] =
  1166.             NewObject
  1167.             (   NULL,              "button.gadget",
  1168.                 GA_ID,             GID_1_BU2,
  1169.                 GA_RelVerify,      TRUE,
  1170.                 GA_Text,           "Sende_r...",
  1171.             TAG_END),
  1172.             LAYOUT_AddChild,       report_gadgets[GID_1_BU3] =
  1173.             NewObject
  1174.             (   NULL,              "button.gadget",
  1175.                 GA_ID,             GID_1_BU3,
  1176.                 GA_RelVerify,      TRUE,
  1177.                 GA_Text,           "Other pa_ge...",
  1178.             TAG_END),
  1179.         TAG_END),
  1180.         CHILD_WeightedHeight,      0,
  1181.     TAG_END),
  1182. TAG_END)))
  1183. {   rq("Can't create ReAction gadgets!");
  1184. }
  1185. unlockscreen();
  1186. openwindow();
  1187.  
  1188.     OnMenu(MainWindowPtr, FULLMENUNUM(MN_PROJECT, IN_NEW,    NOSUB));
  1189.     OnMenu(MainWindowPtr, FULLMENUNUM(MN_PROJECT, IN_OPEN,   NOSUB));
  1190.     OnMenu(MainWindowPtr, FULLMENUNUM(MN_PROJECT, IN_SAVE,   NOSUB));
  1191.     OnMenu(MainWindowPtr, FULLMENUNUM(MN_PROJECT, IN_SAVEAS, NOSUB));
  1192.  
  1193.     updatereportgadgets();
  1194.     ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST1]);
  1195.  
  1196.     loop();
  1197.     readreportgadgets();
  1198.     closewindow();
  1199. }
  1200.  
  1201. MODULE void readreportgadgets(void)
  1202. {   STRPTR stringptr;
  1203.  
  1204.     if (!(GetAttr
  1205.     (   STRINGA_TextVal, report_gadgets[GID_1_ST1], (ULONG *) &stringptr
  1206.     )))
  1207.     {   rq("Unsupported inquiry!"); // should never happen
  1208.     }
  1209.     strcpy(report.summary, stringptr);
  1210.  
  1211.     if (report.type == COM)
  1212.     {   if (!(GetAttr
  1213.         (   STRINGA_TextVal, report_gadgets[GID_1_ST8], (ULONG *) &stringptr
  1214.         )))
  1215.         {   rq("Unsupported inquiry!"); // should never happen
  1216.         }
  1217.         strcpy(report.thirdmanuf, stringptr);
  1218.         if (!(GetAttr
  1219.         (   STRINGA_TextVal, report_gadgets[GID_1_ST9], (ULONG *) &stringptr
  1220.         )))
  1221.         {   rq("Unsupported inquiry!"); // should never happen
  1222.         }
  1223.         strcpy(report.thirdname, stringptr);
  1224.         if (!(GetAttr
  1225.         (   STRINGA_TextVal, report_gadgets[GID_1_ST10], (ULONG *) &stringptr
  1226.         )))
  1227.         {   rq("Unsupported inquiry!"); // should never happen
  1228.         }
  1229.         strcpy(report.thirdver, stringptr);
  1230.     } elif (report.type == BUG)
  1231.     {   if (!(GetAttr
  1232.         (   STRINGA_TextVal, report_gadgets[GID_1_ST7], (ULONG *) &stringptr
  1233.         )))
  1234.         {   rq("Unsupported inquiry!"); // should never happen
  1235.         }
  1236.         strcpy(report.pp, stringptr);
  1237.         if (!(GetAttr
  1238.         (   STRINGA_TextVal, report_gadgets[GID_1_ST6], (ULONG *) &stringptr
  1239.         )))
  1240.         {   rq("Unsupported inquiry!"); // should never happen
  1241.         }
  1242.         strcpy(report.pv, stringptr);
  1243.     }
  1244.     if (report.type != ENH)
  1245.     {   if (!(GetAttr
  1246.         (   STRINGA_TextVal, report_gadgets[GID_1_ST4], (ULONG *) &stringptr
  1247.         )))
  1248.         {   rq("Unsupported inquiry!"); // should never happen
  1249.         }
  1250.         strcpy(report.ks, stringptr);
  1251.         if (!(GetAttr
  1252.         (   STRINGA_TextVal, report_gadgets[GID_1_ST5], (ULONG *) &stringptr
  1253.         )))
  1254.         {   rq("Unsupported inquiry!"); // should never happen
  1255.         }
  1256.         strcpy(report.wb, stringptr);
  1257.         if (!(GetAttr
  1258.         (   STRINGA_TextVal, report_gadgets[GID_1_ST3], (ULONG *) &stringptr
  1259.         )))
  1260.         {   rq("Unsupported inquiry!"); // should never happen
  1261.         }
  1262.         strcpy(report.debug, stringptr);
  1263.     }
  1264.  
  1265.     if (!(GetAttr
  1266.     (   STRINGA_TextVal, report_gadgets[GID_1_ST11], (ULONG *) &stringptr
  1267.     )))
  1268.     {   rq("Unsupported inquiry!"); // should never happen
  1269.     }
  1270.     strcpy(report.chipram, stringptr);
  1271.     if (!(GetAttr
  1272.     (   STRINGA_TextVal, report_gadgets[GID_1_ST12], (ULONG *) &stringptr
  1273.     )))
  1274.     {   rq("Unsupported inquiry!"); // should never happen
  1275.     }
  1276.     strcpy(report.fastram, stringptr);
  1277.     if (!(GetAttr
  1278.     (   STRINGA_TextVal, report_gadgets[GID_1_ST13], (ULONG *) &stringptr
  1279.     )))
  1280.     {   rq("Unsupported inquiry!"); // should never happen
  1281.     }
  1282.     strcpy(report.hard, stringptr);
  1283.     if (!(GetAttr
  1284.     (   STRINGA_TextVal, report_gadgets[GID_1_ST14], (ULONG *) &stringptr
  1285.     )))
  1286.     {   rq("Unsupported inquiry!"); // should never happen
  1287.     }
  1288.     strcpy(report.expansion, stringptr);
  1289.     if (!(GetAttr
  1290.     (   INTEGER_Number, report_gadgets[GID_1_IN1], (ULONG *) &report.floppies
  1291.     )))
  1292.     {   rq("Unsupported inquiry!"); // should never happen
  1293. }   }
  1294.  
  1295. AGLOBAL void savereport(ABOOL saveas)
  1296. { /*    # Subject: <subject><LF>
  1297.         # Type: bug|compat|enhancement<LF>
  1298. 1,3     # Subsystem: <subsystem><LF>
  1299. 2       # ProductName: <name> (vers=<version>)
  1300. 2       # ProductInfo: :<manufacturer>:
  1301.         # Severity: a|b|c|ok|e
  1302. 1       # Release: KS=<version>,WB=<version>,Program=<version>
  1303. 2       # Release: KS=<version>,WB=<version>
  1304.         # Date: <weekday> dd-Mon-yy hh:mm:ss
  1305.         # Refer: <refer>
  1306.         # Path: <path>
  1307.         # ReferID: <referid>
  1308.         # Config: <config>
  1309. 1,2a-c    ### BRIEF BUG DESCRIPTION:
  1310. 1,2a-c    ### BUG GENERATION PROCEDURE OR EXAMPLE:
  1311. 1,2     ### ALSO RUNNING:
  1312.         <debug>
  1313. 1,2     ### IF THIS WORKS DIFFERENTLY ON OTHER VERSIONS OR HARDWARE,
  1314.         EXPLAIN:
  1315. 2a-c    ### WHAT DEVELOPER IS DOING IN THAT AREA OF SW OR HW:    
  1316. 1,2a-c    ### RELATED PROBLEMS:
  1317. 3       ### ENHANCEMENT REQUEST: */
  1318.  
  1319.     readreportgadgets();
  1320.  
  1321.     strcpy(IOBuffer, "# Subject: ");
  1322.     strcat(IOBuffer, report.summary);
  1323.     strcat(IOBuffer, "\n# Type: ");
  1324.     if (report.type == BUG)
  1325.     strcat(IOBuffer, "bug");
  1326.     elif (report.type == COM)
  1327.         strcat(IOBuffer, "compat");
  1328.     else /* assumes (report.type == ENH) */
  1329.         strcat(IOBuffer, "enhancement");
  1330.     strcat(IOBuffer, "\n");
  1331.     if (report.type == BUG || report.type == ENH)
  1332.     {    strcat(IOBuffer, "# Subsystem: ");
  1333.         strcat(IOBuffer, subsystems[report.subsystem].unfriendly);
  1334.     strcat(IOBuffer, "\n");
  1335.     } else
  1336.     {    strcat(IOBuffer, "# ProductName: ");
  1337.     strcat(IOBuffer, report.thirdname);
  1338.         strcat(IOBuffer, " (vers=");
  1339.         strcat(IOBuffer, report.thirdver);
  1340.         strcat(IOBuffer, ")\n# ProductInfo: :");
  1341.         strcat(IOBuffer, report.thirdmanuf);
  1342.         strcat(IOBuffer, ":\n");
  1343.     }
  1344.     strcat(IOBuffer, "# Severity: ");
  1345.     if (report.type == ENH)
  1346.         strcat(IOBuffer, "e");
  1347.     elif (report.severity == 0)
  1348.         strcat(IOBuffer, "a");
  1349.     elif (report.severity == 1)
  1350.         strcat(IOBuffer, "b");
  1351.     elif (report.severity == 2)
  1352.         strcat(IOBuffer, "c");
  1353.     else /* assumes report.severity == 3 */
  1354.     strcat(IOBuffer, "ok");
  1355.     strcat(IOBuffer, "\n");
  1356.     if (report.type == BUG || report.type == COM)
  1357.     {    strcat(IOBuffer, "# Release: KS=");
  1358.         strcat(IOBuffer, report.ks);
  1359.         strcat(IOBuffer, ",WB=");
  1360.         strcat(IOBuffer, report.wb);
  1361.         if (report.type == BUG)
  1362.         {    strcat(IOBuffer, ",Program=");
  1363.             strcat(IOBuffer, report.pv);
  1364.         }
  1365.         strcat(IOBuffer, "\n");
  1366.     }
  1367.     
  1368.     getdate();
  1369.     strcat(IOBuffer, "# Date: ");
  1370.     strcat(IOBuffer, weekdaystring);
  1371.     strcat(IOBuffer, " ");
  1372.     strcat(IOBuffer, datestring);
  1373.     strcat(IOBuffer, " ");
  1374.     strcat(IOBuffer, timestring);
  1375.     strcat(IOBuffer, "\n");
  1376.     strcat(IOBuffer, report.refer);
  1377.     strcat(IOBuffer, report.path);
  1378.     strcat(IOBuffer, report.referid);
  1379.     strcat(IOBuffer, report.config);
  1380.     strcat(IOBuffer, "\n");
  1381.  
  1382.     if (report.type == BUG || (report.type == COM && report.severity != 3))
  1383.     {   strcat
  1384.         (   IOBuffer,
  1385.             "### BRIEF BUG DESCRIPTION:\n"
  1386.         );
  1387.         strcat(IOBuffer, report.textfield[0]);
  1388.         strcat
  1389.         (   IOBuffer,
  1390.             "\n\n### BUG GENERATION PROCEDURE OR EXAMPLE:\n"
  1391.     );
  1392.         strcat(IOBuffer, report.textfield[1]);
  1393.         strcat(IOBuffer, "\n\n");
  1394.     }
  1395.     if (report.type == BUG || report.type == COM)
  1396.     {   strcat(IOBuffer, "### ALSO RUNNING:\n");
  1397.         strcat(IOBuffer, report.debug);
  1398.         strcat
  1399.         (   IOBuffer,
  1400.             "\n\n### IF THIS WORKS DIFFERENTLY ON "
  1401.             "OTHER VERSIONS OR HARDWARE, EXPLAIN:\n"
  1402.         );
  1403.         strcat(IOBuffer, report.textfield[2]);
  1404.         strcat(IOBuffer, "\n\n");
  1405.     }
  1406.     if (report.type == COM && report.severity != 3)
  1407.     {   strcat
  1408.         (   IOBuffer,
  1409.             "### WHAT DEVELOPER IS DOING IN THAT AREA OF HW OR SW:\n"
  1410.         );
  1411.         strcat(IOBuffer, report.textfield[3]);
  1412.         strcat(IOBuffer, "\n\n");
  1413.     }
  1414.     if (report.type == BUG || (report.type == COM && report.severity != 3))
  1415.     {   strcat(IOBuffer, "### RELATED PROBLEMS:\n");
  1416.         strcat(IOBuffer, report.textfield[4]);
  1417.         strcat(IOBuffer, "\n\n");
  1418.     } elif (report.type == ENH)
  1419.     {   strcat(IOBuffer, "### ENHANCEMENT REQUEST:\n");
  1420.         strcat(IOBuffer, report.textfield[5]);
  1421.         strcat(IOBuffer, "\n\n");
  1422.     }
  1423.  
  1424.     if (!report.output[0] || saveas) // if we need a filename
  1425.     {   if (saveasl("Save Bug Report", "~(#?.info)"))
  1426.         {   strcpy(report.output, aslresult);
  1427.             writeout(report.output);
  1428.     }   }
  1429.     else
  1430.     {   writeout(report.output);
  1431. }   }
  1432.     
  1433. AGLOBAL void report_ra_loop(ULONG gid)
  1434. {   switch(gid)
  1435.     {
  1436.     case GID_1_BU1:
  1437.         page = 11;
  1438.     break;
  1439.     case GID_1_BU2:
  1440.         page = 1;
  1441.     break;
  1442.     case GID_1_BU3:
  1443.         page = 12;
  1444.     break;
  1445.     case GID_1_CH1:
  1446.         if (!(GetAttr
  1447.         (   CHOOSER_Selected, report_gadgets[GID_1_CH1], (ULONG *) &report.type
  1448.         )))
  1449.         {   rq("Unsupported inquiry!"); // should never happen
  1450.         }
  1451.         updatereportgadgets();
  1452.     break;
  1453.     case GID_1_CH2:
  1454.         if (!(GetAttr
  1455.         (   CHOOSER_Selected, report_gadgets[GID_1_CH2], (ULONG *) &report.severity
  1456.         )))
  1457.         {   rq("Unsupported inquiry!"); // should never happen
  1458.         }
  1459.         if (report.type == BUG && report.severity == 3)
  1460.         {   report.severity = 0;
  1461.       
  1462.             SetGadgetAttrs
  1463.             (   report_gadgets[GID_1_CH2], MainWindowPtr, NULL,
  1464.                 CHOOSER_Selected,          report.severity
  1465.             );
  1466.             RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH2], MainWindowPtr, NULL);
  1467.         }
  1468.     break;
  1469.     case GID_1_CH3:
  1470.         if (!(GetAttr
  1471.         (   CHOOSER_Selected, report_gadgets[GID_1_CH3], (ULONG *) &report.model
  1472.         )))
  1473.         {   rq("Unsupported inquiry!"); // should never happen
  1474.         }
  1475.     break;
  1476.     case GID_1_CH4:
  1477.         if (!(GetAttr
  1478.         (   CHOOSER_Selected, report_gadgets[GID_1_CH4], (ULONG *) &report.cpu
  1479.         )))
  1480.         {   rq("Unsupported inquiry!"); // should never happen
  1481.         }
  1482.     break;
  1483.     case GID_1_CH5:
  1484.         if (!(GetAttr
  1485.         (   CHOOSER_Selected, report_gadgets[GID_1_CH5], (ULONG *) &report.agnus
  1486.         )))
  1487.         {   rq("Unsupported inquiry!"); // should never happen
  1488.         }
  1489.     break;
  1490.     case GID_1_ST7:
  1491.         if (report.type == BUG)
  1492.         {   refreshpv(); // refreshpv() also reads the gadget for us.
  1493.         }
  1494.     break;
  1495.     case GID_1_BU4:
  1496.         if (report.type == BUG)
  1497.         {   if (asl("~(#?.info)"))
  1498.             {   strcpy(report.pp, aslresult);
  1499.                 SetGadgetAttrs
  1500.                 (   report_gadgets[GID_1_ST7], MainWindowPtr, NULL,
  1501.                     STRINGA_TextVal,           report.pp
  1502.                 );
  1503.                 refreshpv();
  1504.         }   }
  1505.     break;
  1506.     case GID_1_LB1:
  1507.         if (report.type != COM)
  1508.         {   if (!(GetAttr
  1509.             (   LISTBROWSER_Selected, report_gadgets[GID_1_LB1], &report.subsystem
  1510.             )))
  1511.             {   rq("Unsupported inquiry!"); // should never happen
  1512.             }
  1513.             updateemail();
  1514.         }
  1515.     break;
  1516.     default:
  1517.     break;
  1518. }   }
  1519.  
  1520. MODULE void refreshpv(void)
  1521. {   ULONG  i;
  1522.     BPTR   FileHandle;
  1523.     STRPTR stringptr;
  1524.  
  1525.     strcpy(string, "Version ");
  1526.     if (!(GetAttr
  1527.     (   STRINGA_TextVal, report_gadgets[GID_1_ST7], (ULONG *) &stringptr
  1528.     )))
  1529.     {   rq("Unsupported inquiry!"); // should never happen
  1530.     }
  1531.     strcpy(report.pp, stringptr);
  1532.     strcat(string, report.pp);
  1533.  
  1534.     if (!(FileHandle = (BPTR) Open("T:ReportPlus.temp", MODE_NEWFILE)))
  1535.         rq("Can't open T:ReportPlus.temp for writing!");
  1536.     if (!Execute(string, NULL, FileHandle))
  1537.         rq("Can't execute Version!");
  1538.     if (!Close(FileHandle))
  1539.         rq("Can't close T:ReportPlus.temp for writing!");
  1540.  
  1541.     readordie("T:ReportPlus.temp");
  1542.  
  1543.     DeleteFile("T:ReportPlus.temp"); /* returns FALSE for failure */
  1544.     for (i = 0; i <= MEDFIELD; i++)
  1545.     {   if (IOBuffer[i] == LF)
  1546.         {   IOBuffer[i] = 0;
  1547.             break;
  1548.     }   }
  1549.     strcpy(report.pv, IOBuffer);
  1550.     SetGadgetAttrs
  1551.     (   report_gadgets[GID_1_ST6], MainWindowPtr, NULL,
  1552.         STRINGA_TextVal,           report.pv
  1553.     );
  1554. }
  1555.  
  1556. AGLOBAL void report_die(void)
  1557. {   if (SubsystemNodes)
  1558.     {   clearreactionlist(&SubsystemList);
  1559.         SubsystemNodes = FALSE;
  1560. }   }
  1561.  
  1562. AGLOBAL void report_init(void)
  1563. {   ULONG        i;
  1564.     struct Node* ListBrowserNodePtr;
  1565.  
  1566.     NewList(&SubsystemList);
  1567.     for (i = 0; i <= SUBSYSTEMS; i++)
  1568.     {   if (!(ListBrowserNodePtr = AllocListBrowserNode
  1569.         (   1,                  // columns
  1570.             /* LBNCA_ tags are those that apply to the specific column. */
  1571.             LBNA_Column,        0,
  1572.             LBNCA_Text,         subsystems[i].friendly,
  1573.             LBNCA_CopyText,     TRUE,
  1574.             TAG_END
  1575.         )))
  1576.         {   rq("Can't create ReAction listbrowser.gadget node(s)!");
  1577.         }
  1578.         AddTail(&SubsystemList, ListBrowserNodePtr);
  1579.         SubsystemNodes = TRUE;
  1580.     }
  1581.  
  1582.     newreport(FALSE);
  1583. }
  1584.     
  1585. MODULE void updatereportgadgets(void)
  1586. {   // the following command is only needed when New or Open... is the
  1587.     // cause of the update.
  1588.     SetGadgetAttrs
  1589.     (   report_gadgets[GID_1_ST1], MainWindowPtr, NULL,
  1590.         STRINGA_TextVal,           report.summary
  1591.     ); // summary
  1592.  
  1593.     if (report.type == BUG && report.severity == 3)
  1594.     {   report.severity = 0;
  1595.     }
  1596.  
  1597.     SetGadgetAttrs
  1598.     (   report_gadgets[GID_1_CH1], MainWindowPtr, NULL,
  1599.         CHOOSER_Selected,          report.type
  1600.     );
  1601.     RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH1], MainWindowPtr, NULL);
  1602.     SetGadgetAttrs
  1603.     (   report_gadgets[GID_1_LB1], MainWindowPtr, NULL,
  1604.         LISTBROWSER_Selected,      report.subsystem
  1605.     );
  1606.     updateemail();
  1607.  
  1608.     if (report.type == BUG)
  1609.     {   SetGadgetAttrs
  1610.         (   report_gadgets[GID_1_ST7], MainWindowPtr, NULL,
  1611.             STRINGA_TextVal,           report.pp,
  1612.             GA_Disabled,               FALSE
  1613.         );
  1614.         SetGadgetAttrs
  1615.         (   report_gadgets[GID_1_BU4], MainWindowPtr, NULL,
  1616.             GA_Disabled,               FALSE
  1617.         );
  1618.         SetGadgetAttrs
  1619.         (   report_gadgets[GID_1_ST6], MainWindowPtr, NULL,
  1620.             STRINGA_TextVal,           report.pv,
  1621.             GA_Disabled,               FALSE
  1622.         );
  1623.     } else
  1624.     {   SetGadgetAttrs
  1625.         (   report_gadgets[GID_1_ST7], MainWindowPtr, NULL,
  1626.             STRINGA_TextVal,           report.pp,
  1627.             GA_Disabled,               TRUE
  1628.         );
  1629.         SetGadgetAttrs
  1630.         (   report_gadgets[GID_1_BU4], MainWindowPtr, NULL,
  1631.             GA_Disabled,               TRUE
  1632.         );
  1633.         SetGadgetAttrs
  1634.         (   report_gadgets[GID_1_ST6], MainWindowPtr, NULL,
  1635.             STRINGA_TextVal,           report.pv,
  1636.             GA_Disabled,               TRUE
  1637.         );
  1638.     }
  1639.  
  1640.     if (report.type == COM)
  1641.     {   SetGadgetAttrs
  1642.         (   report_gadgets[GID_1_LB1], MainWindowPtr, NULL,
  1643.             GA_Disabled,               TRUE
  1644.         );
  1645.         SetGadgetAttrs
  1646.         (   report_gadgets[GID_1_ST8], MainWindowPtr, NULL,
  1647.             STRINGA_TextVal,           report.thirdmanuf,
  1648.             GA_Disabled,               FALSE
  1649.         );
  1650.         SetGadgetAttrs
  1651.         (   report_gadgets[GID_1_ST9], MainWindowPtr, NULL,
  1652.             STRINGA_TextVal,           report.thirdname,
  1653.             GA_Disabled,               FALSE
  1654.         );
  1655.         SetGadgetAttrs
  1656.         (   report_gadgets[GID_1_ST10],MainWindowPtr, NULL,
  1657.             STRINGA_TextVal,           report.thirdver,
  1658.             GA_Disabled,               FALSE
  1659.         );
  1660.     } else
  1661.     {   SetGadgetAttrs
  1662.         (   report_gadgets[GID_1_LB1], MainWindowPtr, NULL,
  1663.             GA_Disabled,               FALSE
  1664.         );
  1665.         SetGadgetAttrs
  1666.         (   report_gadgets[GID_1_ST8], MainWindowPtr, NULL,
  1667.             STRINGA_TextVal,           report.thirdmanuf,
  1668.             GA_Disabled,               TRUE
  1669.         );
  1670.         SetGadgetAttrs
  1671.         (   report_gadgets[GID_1_ST9], MainWindowPtr, NULL,
  1672.             STRINGA_TextVal,           report.thirdname,
  1673.             GA_Disabled,               TRUE
  1674.         );
  1675.         SetGadgetAttrs
  1676.         (   report_gadgets[GID_1_ST10],MainWindowPtr, NULL,
  1677.             STRINGA_TextVal,           report.thirdver,
  1678.             GA_Disabled,               TRUE
  1679.         );
  1680.     }
  1681.  
  1682.     if (report.type == ENH)
  1683.     {   SetGadgetAttrs
  1684.         (   report_gadgets[GID_1_ST3], MainWindowPtr, NULL,
  1685.             CHOOSER_Selected,          report.debug,
  1686.             GA_Disabled,               TRUE
  1687.         );
  1688.         SetGadgetAttrs
  1689.         (   report_gadgets[GID_1_CH2], MainWindowPtr, NULL,
  1690.             CHOOSER_Selected,          report.severity,
  1691.             GA_Disabled,               FALSE
  1692.         );
  1693.         RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH2], MainWindowPtr, NULL);
  1694.         SetGadgetAttrs
  1695.         (   report_gadgets[GID_1_ST4], MainWindowPtr, NULL,
  1696.             STRINGA_TextVal,           report.ks,
  1697.             GA_Disabled,               TRUE
  1698.         );
  1699.         SetGadgetAttrs
  1700.         (   report_gadgets[GID_1_ST5], MainWindowPtr, NULL,
  1701.             STRINGA_TextVal,           report.wb,
  1702.             GA_Disabled,               TRUE
  1703.         );
  1704.     } else
  1705.     {   SetGadgetAttrs
  1706.         (   report_gadgets[GID_1_ST3], MainWindowPtr, NULL,
  1707.             CHOOSER_Selected,          report.debug,
  1708.             GA_Disabled,               FALSE
  1709.         );
  1710.         SetGadgetAttrs
  1711.         (   report_gadgets[GID_1_CH2], MainWindowPtr, NULL,
  1712.             CHOOSER_Selected,          report.severity,
  1713.             GA_Disabled,               FALSE
  1714.         );
  1715.         RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH2], MainWindowPtr, NULL);
  1716.         SetGadgetAttrs
  1717.         (   report_gadgets[GID_1_ST4], MainWindowPtr, NULL,
  1718.             STRINGA_TextVal,           report.ks,
  1719.             GA_Disabled,               FALSE
  1720.         );
  1721.         SetGadgetAttrs
  1722.         (   report_gadgets[GID_1_ST5], MainWindowPtr, NULL,
  1723.             STRINGA_TextVal,           report.wb,
  1724.             GA_Disabled,               FALSE
  1725.         );
  1726. }   }
  1727.  
  1728. AGLOBAL void newreport(ABOOL display)
  1729. {   ULONG i, stringoffset, bufferoffset;
  1730.     TEXT  cpustring[VLONGFIELD + 1];
  1731.  
  1732.     report.cpu = 0;
  1733.     if (cpuline[0] == '?')
  1734.     {   report.cpu = 0;
  1735.     } else
  1736.     {   stringoffset = 0;
  1737.         bufferoffset = 8;
  1738.         /* If cpuline[] is full of garbage then this code will cause
  1739.            problems. */
  1740.         while (cpuline[bufferoffset] != ' ')
  1741.         {   cpustring[stringoffset] = cpuline[bufferoffset];
  1742.             stringoffset++;
  1743.             bufferoffset++;
  1744.         }
  1745.         stringoffset++;
  1746.         cpustring[stringoffset] = 0;
  1747.  
  1748.         for (i = 0; i <= CPUS; i++)
  1749.         {   if (!stricmp(CPUOptions[i], cpustring))
  1750.             {   report.cpu = i;
  1751.                 break;
  1752.     }   }   }
  1753.  
  1754.     report.floppies      = 1;
  1755.     report.agnus         = 0;
  1756.     report.model         = 4;
  1757.     report.type          = 0;
  1758.     report.severity      = 0;
  1759.     report.subsystem     = 0;
  1760.  
  1761.     report.chipram[0]    =
  1762.     report.fastram[0]    =
  1763.     report.hard[0]       =
  1764.     report.debug[0]      =
  1765.     report.developer[0]  =
  1766.     report.expansion[0]  =
  1767.     report.summary[0]    =
  1768.     report.pv[0]         =
  1769.     report.pp[0]         =
  1770.     report.thirdname[0]  =
  1771.     report.thirdver[0]   =
  1772.     report.thirdmanuf[0] =
  1773.     report.lastname[0]   =
  1774.     report.firstname[0]  =
  1775.     report.company[0]    =
  1776.     report.phone[0]      =
  1777.     report.email[0]      =
  1778.     report.refer[0]      =
  1779.     report.referid[0]    =
  1780.     report.path[0]       =
  1781.     report.config[0]     =
  1782.     report.output[0]     = 0;
  1783.     if (GetVar("Kickstart", report.ks, 6, NULL) == -1)
  1784.         report.ks[0] = 0;
  1785.     if (GetVar("Workbench", report.wb, 6, NULL) == -1)
  1786.         report.wb[0] = 0;
  1787.     for (i = 0; i <= 5; i++)
  1788.     {   report.textfield[i][0] = 0;
  1789.     }
  1790.  
  1791.     /* Quicker than strcpy(report.foo, ""); is report.foo[0] = 0;
  1792.  
  1793.     Consider linking bug report generator with ID database to
  1794.     automatically generate the list of expansion cards. */
  1795.  
  1796.     if (display)
  1797.     {   updatereportgadgets();
  1798. }   }
  1799.  
  1800. AGLOBAL void openreport(void)
  1801. {   if (asl("~(#?.info)"))
  1802.     {   strcpy(report.output, aslresult);
  1803.         loadreport();
  1804.         if (page == 11)
  1805.         {   updatereportgadgets();
  1806. }   }   }
  1807.  
  1808. AGLOBAL void loadreport(void)
  1809. {   ULONG i;
  1810.  
  1811.     /* parse() returns when it has moved along and found the specified
  1812.        `ending string'. The contents, since last parse(), before the
  1813.        `ending string' are returned in string. */
  1814.  
  1815.     if (readin(report.output))
  1816.     {   offset = 0;
  1817.         parse("# Subject: ");           // skip '# Subject: '
  1818.         parse("\n# Type: ");            // goto end of '\n# Type: '
  1819.         strcpy(report.summary, string);
  1820.         parse("\n# ");
  1821.         if (!strcmp(string, "bug"))
  1822.         {   report.type = BUG;
  1823.         } elif (!strcmp(string, "compat"))
  1824.         {   report.type = COM;
  1825.         } elif (!strcmp(string, "enhancement"))
  1826.         {   report.type = ENH;
  1827.         }
  1828.         if (report.type != COM)
  1829.         {   parse("Subsystem: ");
  1830.             parse("\n");
  1831.             for (i = 0; i <= SUBSYSTEMS; i++)
  1832.             {   if (!strcmp(string, subsystems[i].unfriendly))
  1833.                 {   report.subsystem = i;
  1834.                     break;
  1835.         }   }   }
  1836.         else
  1837.         {   parse("ProductName: ");
  1838.             parse(" (vers=");
  1839.             strcpy(report.thirdname,  string);
  1840.             parse(")\n# ProductInfo: :");
  1841.             strcpy(report.thirdver,   string);
  1842.             parse(":\n");
  1843.             strcpy(report.thirdmanuf, string);
  1844.         }
  1845.         parse("# Severity: ");
  1846.         parse("\n# ");
  1847.         if (!strcmp(string, "a"))
  1848.         {   report.severity = 0;
  1849.         } elif (!strcmp(string, "b"))
  1850.         {   report.severity = 1;
  1851.         } elif (!strcmp(string, "c"))
  1852.         {   report.severity = 2;
  1853.         } elif (!strcmp(string, "ok"))
  1854.         {   report.severity = 3;
  1855.         } elif (!strcmp(string, "e"))
  1856.         {   report.type     = ENH;
  1857.         }
  1858.  
  1859.         if (report.type != ENH)
  1860.         {   parse("Release: KS=");
  1861.             parse(",WB=");
  1862.             strcpy(report.ks, string);
  1863.             if (report.type == BUG)
  1864.             {   parse(",Program=");
  1865.                 strcpy(report.wb, string);
  1866.                 parse("\n");
  1867.                 strcpy(report.pv, string);
  1868.             } else
  1869.             {   // assert(report.type == COM);
  1870.                 parse("\n");
  1871.                 strcpy(report.wb, string);
  1872.                 report.pv[0] = 0;
  1873.             }
  1874.         } else report.pv[0] = 0;
  1875.         parse("# Date: ");
  1876.  
  1877.         // now sender fields
  1878.         parse("# Refer: ");
  1879.         parse(",");
  1880.         strcpy(report.lastname, string);
  1881.         parse(" (");
  1882.         strcpy(report.firstname, string);
  1883.         parse(" ,phone ");
  1884.         strcpy(report.company, string);
  1885.         parse(")\n# Path: ");
  1886.         strcpy(report.phone, string);
  1887.         parse("\n# ReferID: ");
  1888.         strcpy(report.email, string);
  1889.         parse("\n");
  1890.         strcpy(report.developer, string);
  1891.  
  1892.         // now config fields
  1893.         parse("# Config: ");
  1894.     parse(",");
  1895.     report.model = 4;
  1896.     for (i = 0; i <= MODELS; i++)
  1897.     {   if (!stricmp(string, ModelOptions[i]))
  1898.         {   report.model = i;
  1899.                 break; // for speed
  1900.     }   }
  1901.         parse(",A=");
  1902.         report.cpu = 0;
  1903.     for (i = 0; i <= CPUS; i++)
  1904.     {   if (!stricmp(string, CPUOptions[i]))
  1905.         {   report.cpu = i;
  1906.                 break; // for speed
  1907.         }   }
  1908.  
  1909.     parse(",D=");
  1910.     if (!stricmp(string, "AA"))
  1911.         report.agnus = 0;
  1912.     elif (!stricmp(string, "ECS-pal"))
  1913.         report.agnus = 1;
  1914.     elif (!stricmp(string, "ECS"))
  1915.         report.agnus = 2;
  1916.     elif (!stricmp(string, "old-pal"))
  1917.         report.agnus = 3;
  1918.     else /* if (!stricmp(string, "old")) */
  1919.         report.agnus = 4;
  1920.  
  1921.     parse(",RAM=");
  1922.         // We will have here "AA", "ECS" or "old", but we don't use this.
  1923.  
  1924.     parse("megC/");
  1925.     strcpy(report.chipram, string);
  1926.  
  1927.     parse("megF,TD=");
  1928.     strcpy(report.fastram, string);
  1929.  
  1930.     parse(",HD=");
  1931.     report.floppies = atol(string);
  1932.  
  1933.     parse(",");
  1934.     strcpy(report.hard, string);
  1935.  
  1936.     parse("\n");
  1937.         strcpy(report.expansion, string);
  1938.  
  1939.         report.pp[0] = 0;
  1940.  
  1941.         if (report.type == BUG)
  1942.         {   parse("### BRIEF BUG DESCRIPTION:\n");
  1943.             parse("\n### BUG GENERATION PROCEDURE OR EXAMPLE:\n");
  1944.             strcpy(report.textfield[0], string);     // bug description
  1945.             parse("\n### ALSO RUNNING:\n");
  1946.             strcpy(report.textfield[1], string);     // bug procedure
  1947.             parse("\n### IF THIS WORKS DIFFERENTLY ON OTHER VERSIONS "
  1948.                   "OR HARDWARE, EXPLAIN:\n");
  1949.             strcpy(report.debug, string);            // also running
  1950.             parse("\n### RELATED PROBLEMS:\n");
  1951.             strcpy(report.textfield[2], string);     // explain differently
  1952.             parsetoend();
  1953.             strcpy(report.textfield[3], string);     // related problems
  1954.         } elif (report.type == COM)
  1955.         {   if (report.severity != 3)
  1956.             {   parse("### BRIEF BUG DESCRIPTION:\n");
  1957.                 parse("\n### BUG GENERATION PROCEDURE OR EXAMPLE:\n");
  1958.                 strcpy(report.textfield[0], string); // bug description
  1959.                 parse("\n### ALSO RUNNING:\n");
  1960.                 strcpy(report.textfield[1], string); // bug procedure
  1961.                 parse("\n### IF THIS WORKS DIFFERENTLY ON OTHER VERSIONS "
  1962.                       "OR HARDWARE, EXPLAIN:\n");
  1963.                 strcpy(report.debug, string);        // also running
  1964.                 parse("\n### WHAT DEVELOPER IS DOING IN THAT AREA OF SW "
  1965.                       "OR HW:\n");
  1966.                 strcpy(report.textfield[2], string); // explain differently
  1967.                 parse("\n### RELATED PROBLEMS:\n");
  1968.                 strcpy(report.textfield[3], string); // what doing?
  1969.                 parsetoend();
  1970.                 strcpy(report.textfield[4], string); // related problems
  1971.             } else
  1972.             {   parse("### BRIEF BUG DESCRIPTION:\n");
  1973.                 parse("\n### BUG GENERATION PROCEDURE OR EXAMPLE:\n");
  1974.                 strcpy(report.textfield[0], string); // bug description
  1975.                 parse("\n### WHAT DEVELOPER IS DOING IN THAT AREA OF SW "
  1976.                       "OR HW:\n");
  1977.                 strcpy(report.textfield[1], string); // explain differently
  1978.                 parse("\n### RELATED PROBLEMS:\n");
  1979.                 strcpy(report.textfield[2], string); // what doing?
  1980.                 parsetoend();
  1981.                 strcpy(report.textfield[3], string); // related problems
  1982.         }   }
  1983.         else
  1984.         {   // assert(report.type == ENH);
  1985.             parse("### ENHANCEMENT REQUEST:\n");
  1986.             parsetoend();
  1987.             strcpy(report.textfield[0], string);
  1988.         }
  1989.         updatereportgadgets();
  1990. }   }
  1991.  
  1992. /*          # Subject: <subject><LF>
  1993.             # Type: bug|compat|enhancement<LF>
  1994. BUG,ENH     # Subsystem: <subsystem><LF>
  1995. COM         # ProductName: <name> (vers=<version>)
  1996. COM         # ProductInfo: :<manufacturer>:
  1997.             # Severity: a|b|c|ok|e
  1998. BUG         # Release: KS=<version>,WB=<version>,Program=<version>
  1999. COM         # Release: KS=<version>,WB=<version>
  2000.             # Date: <weekday> dd-Mon-yy hh:mm:ss
  2001.             # Refer: <refer>
  2002.             # Path: <path>
  2003.             # ReferID: <referid>
  2004.             # Config: <config>
  2005. BUG,COMa-c  ### BRIEF BUG DESCRIPTION:
  2006. BUG,COMa-c  ### BUG GENERATION PROCEDURE OR EXAMPLE:
  2007. BUG,COM     ### ALSO RUNNING:
  2008.             <debug>
  2009. BUG,COM     ### IF THIS WORKS DIFFERENTLY ON OTHER VERSIONS OR HARDWARE,
  2010.             EXPLAIN:
  2011. COMa-c        ### WHAT DEVELOPER IS DOING IN THAT AREA OF SW OR HW:    
  2012. BUG,COMa-c  ### RELATED PROBLEMS:
  2013. ENH         ### ENHANCEMENT REQUEST: */
  2014.  
  2015. AGLOBAL void report2(void)
  2016. {   struct Hook    Hook1Struct;
  2017.     STRPTR         textBuffer[MAXELEMENTS + 1] = {NULL, NULL, NULL, NULL, NULL}; // to avoid spurious compiler warnings
  2018.     TEXT           GadTitle[MAXELEMENTS + 1][VLONGFIELD + 1];
  2019.     ULONG          i, counter,
  2020.                    elements = 0; // to avoid spurious compiler warnings
  2021.     struct TagItem tag_texteditor[4] =
  2022.     { { GA_ID,                    NULL                  }, // ti_Data filled later
  2023.       { GA_RelVerify,             TRUE                  },
  2024.       { GA_TEXTEDITOR_ExportWrap, 75                    },
  2025.       { TAG_END,                  NULL                  }
  2026.     }, tag_subcaption[3] =
  2027.     { { LABEL_Text,               NULL                  }, // ti_Data filled later
  2028.       { LABEL_Justification,      LJ_CENTRE             },
  2029.       { TAG_END,                  NULL                  }
  2030.     }, tag_button[4] =
  2031.     { { GA_ID,                    GID_1_BU1             },
  2032.       { GA_RelVerify,             TRUE                  },
  2033.       { GA_Text,                  (ULONG) "_Other page..."},
  2034.       { TAG_END,                  NULL                  }
  2035.     }, tag_supercaption[6] =
  2036.     { { LAYOUT_Orientation,       LAYOUT_ORIENT_VERT    },
  2037.       { LAYOUT_VertAlignment,     LALIGN_CENTER         },
  2038.       { LAYOUT_HorizAlignment,    LALIGN_CENTER         },
  2039.       { LAYOUT_BevelStyle,        BVS_NONE              },
  2040.       { LAYOUT_AddImage,          NULL                  }, // ti_Data filled later
  2041.       { TAG_END,                  NULL                  }
  2042.     }, tag_onlylayout[23] =
  2043.     { { LAYOUT_Orientation,       LAYOUT_ORIENT_VERT    },
  2044.       { LAYOUT_DeferLayout,       TRUE                  },
  2045.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2046.       { CHILD_WeightedHeight,     0                     },
  2047.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2048.       { CHILD_MinHeight,          80                    },
  2049.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2050.       { CHILD_WeightedHeight,     0                     },
  2051.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2052.       { CHILD_MinHeight,          80                    },
  2053.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2054.       { CHILD_WeightedHeight,     0                     },
  2055.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2056.       { CHILD_MinHeight,          80                    },
  2057.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2058.       { CHILD_WeightedHeight,     0                     },
  2059.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2060.       { CHILD_MinHeight,          80                    },
  2061.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2062.       { CHILD_WeightedHeight,     0                     },
  2063.       { LAYOUT_AddChild,          NULL                  }, // ti_Data filled later
  2064.       { CHILD_MinHeight,          80                    },
  2065.       { TAG_END,                  NULL                  }
  2066.     }, tag_rootlayout[8] =
  2067.     { { LAYOUT_Orientation,    LAYOUT_ORIENT_VERT    },
  2068.       { LAYOUT_SpaceOuter,     TRUE                  },
  2069.       { LAYOUT_DeferLayout,    TRUE                  },
  2070.       { LAYOUT_AddChild,       NULL                  }, // ti_Data filled later
  2071.       { CHILD_WeightedHeight,  100,                  },
  2072.       { LAYOUT_AddChild,       NULL                  }, // ti_Data filled later
  2073.       { CHILD_WeightedHeight,  0                     },
  2074.       { TAG_END,               NULL                  }
  2075.     }, tag_window[15] =
  2076.     { { WA_PubScreen,          NULL                                            }, // ti_Data filled later
  2077.       { WA_ScreenTitle,        (ULONG) "Report+"                               },
  2078.       { WA_Title,              (ULONG) "Report+: Report Details (Page 2 of 2)" },
  2079.       { WA_Activate,           TRUE                  },
  2080.       { WA_DepthGadget,        TRUE                  },
  2081.       { WA_DragBar,            TRUE                  },
  2082.       { WA_CloseGadget,        TRUE                  },
  2083.       { WA_SizeGadget,         TRUE                  },
  2084.       { WA_IDCMP,              IDCMP_RAWKEY          },
  2085.       { WINDOW_IDCMPHook,      NULL                  }, // ti_Data filled later
  2086.       { WINDOW_IDCMPHookBits,  IDCMP_RAWKEY          },
  2087.       { WINDOW_MenuStrip,      NULL                  }, // ti_Data filled later
  2088.       { WINDOW_Position,       WPOS_CENTERSCREEN     },
  2089.       { WINDOW_ParentGroup,    NULL                  }, // ti_Data filled later
  2090.       { TAG_END,               NULL                  }
  2091.     };
  2092.  
  2093.     switch(report.type)
  2094.     {
  2095.     case BUG:
  2096.         strcpy(GadTitle[0], "Brief bug _description:");
  2097.         strcpy(GadTitle[1], "_Bug generation procedure or example:");
  2098.         strcpy(GadTitle[2], "_If this works differently on other versions or hardware, explain:");
  2099.         strcpy(GadTitle[3], "_Related problems:");
  2100.         elements = 3;
  2101.     break;
  2102.     case COM:
  2103.         if (report.severity == 3)
  2104.         {   strcpy(GadTitle[0], "_If this works differently on other versions or hardware, explain:");
  2105.             elements = 0;
  2106.         } else
  2107.         {   strcpy(GadTitle[0], "Brief bug _description:");
  2108.             strcpy(GadTitle[1], "_Bug generation procedure or example:");
  2109.             strcpy(GadTitle[2], "_If this works differently on other versions or hardware, explain:");
  2110.             strcpy(GadTitle[3], "_What developer is doing in that area of software or hardware:");
  2111.             strcpy(GadTitle[4], "_Related problems:");
  2112.             elements = 4;
  2113.         }
  2114.         break;
  2115.     case ENH:
  2116.         strcpy(GadTitle[0], "_Enhancement request:");
  2117.         elements = 0;
  2118.     break;
  2119.     default:
  2120.         // assert(0);
  2121.     break;
  2122.     }
  2123.  
  2124.     /* window
  2125.         root-layout
  2126.          only-layout
  2127.           [super-caption
  2128.            sub-caption
  2129.           texteditor]...
  2130.          button
  2131.  
  2132.     It's not necessary to use only-layout, a more efficient way is:
  2133.  
  2134.        window
  2135.         root-layout
  2136.          [super-caption
  2137.           sub-caption
  2138.          texteditor]...
  2139.          button */
  2140.  
  2141.     counter = 2;
  2142.     for (i = 0; i <= elements; i++)
  2143.     {   tag_subcaption[0].ti_Data          = (ULONG) GadTitle[i];
  2144.         tag_texteditor[0].ti_Data          = GID_1_TE1 + i;
  2145.         tag_supercaption[4].ti_Data        = (ULONG) NewObjectA(LABEL_GetClass(),      NULL, tag_subcaption);
  2146.         tag_onlylayout[counter].ti_Data    = (ULONG) NewObjectA(LAYOUT_GetClass(),     NULL, tag_supercaption);
  2147.         counter += 2;
  2148.         tag_onlylayout[counter].ti_Data    =
  2149.         report_gadgets[GID_1_TE1 + i]      = (ULONG) NewObjectA(TEXTEDITOR_GetClass(), NULL, tag_texteditor);
  2150.         counter += 2;
  2151.     }
  2152.     tag_onlylayout[counter].ti_Tag         = TAG_END;
  2153.  
  2154.     tag_rootlayout[3].ti_Data   = (ULONG) NewObjectA(LAYOUT_GetClass(), NULL,            tag_onlylayout);
  2155.     tag_rootlayout[5].ti_Data   =
  2156.     report_gadgets[GID_1_BU1]   = (ULONG) NewObjectA(NULL,              "button.gadget", tag_button);
  2157.  
  2158.     tag_window[13].ti_Data      =
  2159.     report_gadgets[GID_1_LY1]   = (ULONG) NewObjectA(LAYOUT_GetClass(), NULL,            tag_rootlayout);
  2160.  
  2161.     InitHook(&Hook1Struct, Hook1Func, NULL);
  2162.     tag_window[9].ti_Data       = &Hook1Struct;
  2163.     lockscreen();
  2164.     tag_window[0].ti_Data       = (ULONG) ScreenPtr;
  2165.     tag_window[11].ti_Data      = MenuPtr;
  2166.     WinObject[1]                = (ULONG) NewObjectA(WINDOW_GetClass(), NULL,             tag_window);
  2167.     unlockscreen();
  2168.     if (!WinObject[1]) // Object creation successful?
  2169.     {   rq("Can't create ReAction objects!");
  2170.     }
  2171.     openwindow();
  2172.  
  2173.     // Do any necessary imports.
  2174.     switch(report.type)
  2175.     {
  2176.     case BUG:
  2177.         SetGadgetAttrs
  2178.         (   report_gadgets[GID_1_TE1], MainWindowPtr, NULL,
  2179.             GA_TEXTEDITOR_Contents,    report.textfield[0]
  2180.         );
  2181.         SetGadgetAttrs
  2182.         (   report_gadgets[GID_1_TE2], MainWindowPtr, NULL,
  2183.             GA_TEXTEDITOR_Contents,    report.textfield[1]
  2184.         );
  2185.         SetGadgetAttrs
  2186.         (   report_gadgets[GID_1_TE3], MainWindowPtr, NULL,
  2187.             GA_TEXTEDITOR_Contents,    report.textfield[2]
  2188.         );
  2189.         SetGadgetAttrs
  2190.         (   report_gadgets[GID_1_TE4], MainWindowPtr, NULL,
  2191.             GA_TEXTEDITOR_Contents,    report.textfield[4]
  2192.         );
  2193.     break;
  2194.     case COM:
  2195.         if (report.severity == 3)
  2196.         {   SetGadgetAttrs
  2197.             (   report_gadgets[GID_1_TE1],         MainWindowPtr, NULL,
  2198.                 GA_TEXTEDITOR_Contents,            report.textfield[2]
  2199.             ); // if this works differently...
  2200.         } else
  2201.         {   for (i = 0; i <= 4; i++)
  2202.             {   SetGadgetAttrs
  2203.                 (   report_gadgets[GID_1_TE1 + i], MainWindowPtr, NULL,
  2204.                     GA_TEXTEDITOR_Contents,        report.textfield[i]
  2205.                 );
  2206.         }   }
  2207.     break;
  2208.     case ENH:
  2209.         SetGadgetAttrs
  2210.         (   report_gadgets[GID_1_TE1], MainWindowPtr, NULL,
  2211.             GA_TEXTEDITOR_Contents,    report.textfield[5]
  2212.         ); // enhancement request
  2213.     break;
  2214.     default:
  2215.         ; // assert(0);
  2216.     break;
  2217.     }
  2218.  
  2219.     /* 0: brief bug description
  2220.        1: bug generation procedure or example
  2221.        2: if this works differently...
  2222.        3: what developer is doing...
  2223.        4: related problems
  2224.        5: enhancement request */
  2225.  
  2226.     ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE1]);
  2227.     loop();
  2228.  
  2229.     for (i = 0; i <= elements; i++)
  2230.     {   textBuffer[i] = (STRPTR) DoGadgetMethod(report_gadgets[GID_1_TE1 + i], MainWindowPtr, NULL, GM_TEXTEDITOR_ExportText, NULL);
  2231.     }
  2232.     switch(report.type)
  2233.     {
  2234.     case BUG:
  2235.         strcpy(report.textfield[0], textBuffer[0]); // brief bug description
  2236.         strcpy(report.textfield[1], textBuffer[1]); // bug generation procedure or example
  2237.         strcpy(report.textfield[2], textBuffer[2]); // if this works differently...
  2238.         strcpy(report.textfield[4], textBuffer[3]); // related problems
  2239.     break;
  2240.     case COM:
  2241.         if (report.severity == 3)
  2242.         {   strcpy(report.textfield[2], textBuffer[0]); // if this works differently...
  2243.         } else
  2244.         {   strcpy(report.textfield[0], textBuffer[0]); // brief bug description
  2245.             strcpy(report.textfield[1], textBuffer[1]); // bug generation procedure or example
  2246.             strcpy(report.textfield[2], textBuffer[2]); // if this works differently...
  2247.             strcpy(report.textfield[3], textBuffer[3]); // what developer is doing...
  2248.             strcpy(report.textfield[4], textBuffer[4]); // related problems
  2249.         }
  2250.     break;
  2251.     case ENH:
  2252.         strcpy(report.textfield[5], textBuffer[0]); // enhancement request
  2253.     break;
  2254.     default:
  2255.         ; // assert(0);
  2256.     break;
  2257.     }
  2258.  
  2259.     for (i = 0; i <= elements; i++)
  2260.     {   FreeVec((APTR) textBuffer[i]);
  2261.         textBuffer[i] = NULL;
  2262.     }
  2263.     closewindow();
  2264. }
  2265.  
  2266. MODULE ULONG Hook1Func(struct Hook *h, VOID *o, VOID *msg)
  2267. {   /* "When the hook is called, the data argument points to the
  2268.     window object and message argument to the IntuiMessage." */
  2269.  
  2270.     UWORD code, qual;
  2271.     ULONG scroll = 0;
  2272.  
  2273.     geta4(); // wait till here before doing anything
  2274.     code = ((struct IntuiMessage *) msg)->Code;
  2275.     qual = ((struct IntuiMessage *) msg)->Qualifier;
  2276.  
  2277.     switch(code)
  2278.     {
  2279.     case SCAN_HELP:
  2280.         helpabout();
  2281.     break;
  2282.     case SCAN_ESCAPE:
  2283.         /* Crashes to try to go to page 0, or quit the program, from page
  2284.            12. Must go via page 11 first. Although clicking the close
  2285.            gadget to go to page 0 seems to work fine. */
  2286.         if (page != 12 && ((qual & IEQUALIFIER_LSHIFT) || (qual & IEQUALIFIER_RSHIFT)))
  2287.         {   cleanexit(EXIT_SUCCESS);
  2288.         } elif (page == 11)
  2289.         {   page = 0;
  2290.         } else
  2291.         {   // assert(page == 12);
  2292.             page = 11;
  2293.         }
  2294.     break;
  2295.     case SCAN_UP:
  2296.         if (report.type != COM)
  2297.         {   if (qual & IEQUALIFIER_CONTROL)
  2298.             {   scroll = LBP_TOP;
  2299.             } elif (qual & IEQUALIFIER_LSHIFT || qual & IEQUALIFIER_RSHIFT)
  2300.             {   scroll = LBP_PAGEUP;
  2301.             } else scroll = LBP_LINEUP;
  2302.         }
  2303.     break;
  2304.     case SCAN_DOWN:
  2305.         if (report.type != COM)
  2306.         {   if (qual & IEQUALIFIER_CONTROL)
  2307.             {   scroll = LBP_BOTTOM;
  2308.             } elif (qual & IEQUALIFIER_LSHIFT || qual & IEQUALIFIER_RSHIFT)
  2309.             {   scroll = LBP_PAGEDOWN;
  2310.             } else scroll = LBP_LINEDOWN;
  2311.         }
  2312.     break;
  2313.     case SCAN_A:
  2314.         if (page == 11 && report.type == COM)
  2315.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST9]);
  2316.         }
  2317.     break;
  2318.     case SCAN_B:
  2319.         if (page == 12)
  2320.         {   if (report.type == BUG || (report.type == COM && report.severity != 3))
  2321.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE2]);
  2322.         }   } // "_bug generation procedure or example", when present, is always GID_1_TE2.
  2323.     break;
  2324.     case SCAN_C:
  2325.         if (page == 11)
  2326.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST11]);
  2327.         }
  2328.     break;
  2329.     case SCAN_D:
  2330.         if (page == 11)
  2331.         {   if (report.type != ENH)
  2332.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST3]);
  2333.         }   }
  2334.         elif (page == 12)
  2335.         {   if (report.type == BUG || (report.type == COM && report.severity != 3))
  2336.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE1]);
  2337.         }   } // "brief bug _description", when present, is always GID_1_TE1.
  2338.     break;
  2339.     case SCAN_E:
  2340.         if (page == 12 && report.type == ENH)
  2341.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE1]);
  2342.         } // "_enhancement request", when present, is always GID_1_TE1.
  2343.     break;
  2344.     case SCAN_H:
  2345.         if (page == 11)
  2346.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST13]);
  2347.         }
  2348.     break;
  2349.     case SCAN_I:
  2350.         if (page == 11)
  2351.         {   if ((qual & IEQUALIFIER_LSHIFT) || (qual & IEQUALIFIER_RSHIFT))
  2352.             {   if (report.agnus == 0)
  2353.                     report.agnus = AGNUSES;
  2354.                 else report.agnus--;
  2355.             } else
  2356.             {   if (report.agnus == AGNUSES)
  2357.                     report.agnus = 0;
  2358.                 else report.agnus++;
  2359.             }
  2360.             SetGadgetAttrs
  2361.             (   report_gadgets[GID_1_CH5], MainWindowPtr, NULL,
  2362.                 CHOOSER_Selected,          report.agnus
  2363.             );
  2364.             RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH5], MainWindowPtr, NULL);
  2365.         } elif (page == 12)
  2366.         {   if (report.type == BUG || (report.type == COM && report.severity != 3))
  2367.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE3]);
  2368.             } elif (report.type == COM && report.severity == 3)
  2369.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE1]);
  2370.         }   }
  2371.     break;
  2372.     case SCAN_K:
  2373.         if (page == 11 && report.type != ENH)
  2374.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST4]);
  2375.         }
  2376.     break;
  2377.     case SCAN_M:
  2378.         if (page == 11)
  2379.         {   if ((qual & IEQUALIFIER_LSHIFT) || (qual & IEQUALIFIER_RSHIFT))
  2380.             {   if (report.model == 0)
  2381.                     report.model = MODELS;
  2382.                 else report.model--;
  2383.             } else
  2384.             {   if (report.model == MODELS)
  2385.                     report.model = 0;
  2386.                 else report.model++;
  2387.             }
  2388.             SetGadgetAttrs
  2389.             (   report_gadgets[GID_1_CH3], MainWindowPtr, NULL,
  2390.                 CHOOSER_Selected,          report.model
  2391.             );
  2392.             RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH3], MainWindowPtr, NULL);
  2393.         }
  2394.     break;
  2395.     case SCAN_N:
  2396.         if (page == 11)
  2397.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_IN1]);
  2398.         }
  2399.     break;
  2400.     case SCAN_O:
  2401.         if (page == 11 && report.type == BUG)
  2402.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST6]);
  2403.         }
  2404.     break;
  2405.     case SCAN_P:
  2406.         if (page == 11)
  2407.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST7]);
  2408.         }
  2409.     break;
  2410.     case SCAN_R:
  2411.         if (page == 11)
  2412.         {   if (report.type == COM)
  2413.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST8]);
  2414.         }   }
  2415.         elif (page == 12)
  2416.         {   if (report.type == BUG)
  2417.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE4]);
  2418.             } elif (report.type == COM && report.severity != 3)
  2419.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE5]);
  2420.         }   }
  2421.     break;
  2422.     case SCAN_S:
  2423.         if (page == 11)
  2424.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST1]);
  2425.         }
  2426.     break;
  2427.     case SCAN_T:
  2428.         if (page == 11)
  2429.         {   if ((qual & IEQUALIFIER_LSHIFT) || (qual & IEQUALIFIER_RSHIFT))
  2430.             {   if (report.type == 0)
  2431.                 {   report.type = 2;
  2432.                 } else report.type--;
  2433.             } else
  2434.             {   if (report.type == 2)
  2435.                 {   report.type = 0;
  2436.                 } else report.type++;
  2437.             }
  2438.             updatereportgadgets();
  2439.         }
  2440.     break;
  2441.     case SCAN_U:
  2442.         if (page == 11)
  2443.         {   if ((qual & IEQUALIFIER_LSHIFT) || (qual & IEQUALIFIER_RSHIFT))
  2444.             {   if (report.cpu == 0)
  2445.                     report.cpu = CPUS;
  2446.                 else report.cpu--;
  2447.             } else
  2448.             {   if (report.cpu == CPUS)
  2449.                     report.cpu = 0;
  2450.                 else report.cpu++;
  2451.             }
  2452.             SetGadgetAttrs
  2453.             (   report_gadgets[GID_1_CH4], MainWindowPtr, NULL,
  2454.                 CHOOSER_Selected,          report.cpu
  2455.             );
  2456.             RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH4], MainWindowPtr, NULL);
  2457.         }
  2458.     break;
  2459.     case SCAN_V:
  2460.         if (page == 11 && report.type == COM)
  2461.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST10]);
  2462.         }
  2463.     break;
  2464.     case SCAN_W:
  2465.         if (page == 11)
  2466.         {   if (report.type != ENH)
  2467.             {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST5]);
  2468.         }   }
  2469.         elif (page == 12 && report.type == COM && report.severity != 3)
  2470.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY1], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_TE3]);
  2471.         } // "_what developer is doing...", when present, is always GID_1_TE4.
  2472.     break;
  2473.     case SCAN_X:
  2474.         if (page == 11)
  2475.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST14]);
  2476.         }
  2477.     break;
  2478.     case SCAN_Y:
  2479.         if (page == 11 && report.type != ENH)
  2480.         {   if ((qual & IEQUALIFIER_LSHIFT) || (qual & IEQUALIFIER_RSHIFT))
  2481.             {   if (report.severity == 0)
  2482.                 {   report.severity = 3;
  2483.                 } else report.severity--;
  2484.             } else
  2485.             {   if (report.severity == 3)
  2486.                 {   report.severity = 0;
  2487.                 } else report.severity++;
  2488.             }
  2489.             if (report.type == BUG && report.severity == 3)
  2490.             {   report.severity = 0;
  2491.             }
  2492.             SetGadgetAttrs
  2493.             (   report_gadgets[GID_1_CH1], MainWindowPtr, NULL,
  2494.                 CHOOSER_Selected,          report.severity
  2495.             );
  2496.             RefreshGadgets((struct Gadget *) report_gadgets[GID_1_CH1], MainWindowPtr, NULL);
  2497.         }
  2498.     break;
  2499.     case SCAN_SLASH:
  2500.         if (page == 11)
  2501.         {   ActivateLayoutGadget(report_gadgets[GID_1_LY2], MainWindowPtr, NULL, (Object) report_gadgets[GID_1_ST12]);
  2502.         }
  2503.     break;
  2504.     case SCAN_PERIOD:
  2505.         if (page == 11 && report.type == BUG)
  2506.         {   if (asl("~(#?.info)"))
  2507.             {   strcpy(report.pp, aslresult);
  2508.                 SetGadgetAttrs
  2509.                 (   report_gadgets[GID_1_ST7], MainWindowPtr, NULL,
  2510.                     STRINGA_TextVal,           report.pp
  2511.                 );
  2512.                 refreshpv();
  2513.         }   }
  2514.     break;
  2515.     default:
  2516.     break;
  2517.     }
  2518.  
  2519.     if (report.type != ENH && (code == SCAN_UP || code == SCAN_DOWN))
  2520.     {   SetGadgetAttrs
  2521.         (   report_gadgets[GID_1_LB1],    // pointer to gadget
  2522.             MainWindowPtr,                // pointer to window (not window object!)
  2523.             NULL,                         // pointer to requester
  2524.             LISTBROWSER_Position, scroll, // tags
  2525.             TAG_DONE                      // done
  2526.         );
  2527.     }
  2528.  
  2529.     return(1);
  2530. }
  2531.  
  2532. MODULE void updateemail(void)
  2533. {   if
  2534.     (   (!stricmp(subsystems[report.subsystem].unfriendly, "wormwars"))
  2535.      || (!stricmp(subsystems[report.subsystem].unfriendly, "report+"))
  2536.      || (!stricmp(subsystems[report.subsystem].unfriendly, "saga"))
  2537.     )
  2538.     {   SetGadgetAttrs
  2539.         (   report_gadgets[GID_1_ST2], MainWindowPtr, NULL,
  2540.             STRINGA_TextVal,           "amigansoftware@abime.net"
  2541.         ); // email to
  2542.     } else
  2543.     {   SetGadgetAttrs
  2544.         (   report_gadgets[GID_1_ST2], MainWindowPtr, NULL,
  2545.             STRINGA_TextVal,           "support@haage-partner.com"
  2546.         ); // email to
  2547. }   }
  2548.